]> git.ozlabs.org Git - ccan/commitdiff
opt: incidental comment and whitespace repair
authorDouglas Bagnall <douglas@paradise.net.nz>
Sat, 13 Aug 2011 12:19:59 +0000 (21:49 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Sat, 13 Aug 2011 12:19:59 +0000 (21:49 +0930)
This comment occurred in a couple of places:

 /* Set an integer value, various forms.  Sets to 1 on arg == NULL. */

One instance was clearly spurious, while the other was misleading.

Another resolution to this mismatch would be to add
"if (arg == NULL){*l = 1; return NULL}" somewhere, but I suspect
it may have been left out/removed because someone thought better.

ccan/opt/helpers.c

index 7022afbbf090a53346388bdbd6a3f5d2b00ce290..a27be22f3d1a6475221a1b7fa86756f148fa68b9 100644 (file)
@@ -56,7 +56,8 @@ char *opt_set_charp(const char *arg, char **p)
        return NULL;
 }
 
-/* Set an integer value, various forms.  Sets to 1 on arg == NULL. */
+/* Set an integer value, various forms.
+   FIXME: set to 1 on arg == NULL ? */
 char *opt_set_intval(const char *arg, int *i)
 {
        long l;
@@ -102,7 +103,7 @@ char *opt_set_ulongval(const char *arg, unsigned long *ul)
 {
        long int l;
        char *err;
-       
+
        err = opt_set_longval(arg, &l);
        if (err)
                return err;
@@ -153,7 +154,7 @@ void opt_show_charp(char buf[OPT_SHOW_LEN], char *const *p)
                buf[2+len] = '\0';
 }
 
-/* Set an integer value, various forms.  Sets to 1 on arg == NULL. */
+/* Show an integer value, various forms. */
 void opt_show_intval(char buf[OPT_SHOW_LEN], const int *i)
 {
        snprintf(buf, OPT_SHOW_LEN, "%i", *i);