Thread (19 messages) flat view 19 messages, 4 authors, 2013-02-07

Re: [PATCH for 3.8] iproute2: Add "ip netns pids" and "ip netns identify"

From: Ben Hutchings <hidden>
Date: 2013-01-18 01:00:27

On Thu, 2013-01-17 at 16:23 -0800, Eric W. Biederman wrote:
Ben Hutchings [off-list ref] writes:
quoted
On Mon, 2012-11-26 at 17:16 -0600, Eric W. Biederman wrote:
[...]
quoted
quoted
--- a/ip/ipnetns.c
+++ b/ip/ipnetns.c
[...]
quoted
quoted
+static int is_pid(const char *str)
+{
+	int ch;
+	for (; (ch = *str); str++) {
+		if (!isdigit(ch))
ch must be cast to unsigned char before passing to isdigit().
isdigit is defined to take an int.  A legacy of the implicit casts in
the K&R C days.  Casting to unsigned char would be pointless and silly.
[...]

It's not pointless.  This is explained in the very first line of the
description in the manual page...

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help