Re: [PATCH] argv_split: allow argv_split to handle NULL pointer in argcp parameter gracefully





On Tue, 31 Jul 2007, Neil Horman wrote:

As Jeremy and I had discussed in a previous thread, it would be nice if the
argv_split library function could gracefully handle a NULL pointer in the argcp
parameter, so as to allow functions using it that did not care about the value
of argc to not have to declare a useless variable. This patch accomplishes
that. Tested by me, with successful results.

The patch itself looks simple and straightforward enough, but having done
this, now you'd also want to cleanup the use of the dummy variable in the
callsites you mentioned above, correct? (Unless that's what Jeremy meant
in his reply already)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [PATCH] argv_split: allow argv_split to handle NULL pointer in argcp parameter gracefully
    ... argv_split library function could gracefully handle a NULL pointer in the argcp ... so as to allow functions using it that did not care about the value ...
    (Linux-Kernel)
  • Re: basic_string ctor
    ... > Which doesn't make it right - C strings are lame at best and we all know ... They are not lame - they just have their drawbacks. ... > pointer is entirely up to the object's constructor to decide. ... Now the internal library function was like ...
    (microsoft.public.vc.stl)
  • Re: Malcolms new book - Chapter 1 review
    ... user of the library function could decide on some suitable upper ... pointer to the next input line. ... attempt to allocate an arbitrarily large amount of memory. ... lets you specify a limit. ...
    (comp.lang.c)
  • Re: Malcolms new book - Chapter 1 review
    ... user of the library function could decide on some suitable upper ... pointer to the next input line. ... attempt to allocate an arbitrarily large amount of memory. ... lets you specify a limit. ...
    (comp.lang.c)
  • Re: Writing bulletproof code
    ... That wild pointer might just point to ... > on and ship with debug off. ... Exceptions allow graceful management of errors. ...
    (comp.programming)