]> arthur.barton.de Git - netatalk.git/commitdiff
dbd: two fixes for new user option
authorRalph Boehme <rb@sernet.de>
Wed, 30 Apr 2014 12:47:20 +0000 (14:47 +0200)
committerRalph Boehme <rb@sernet.de>
Tue, 20 May 2014 16:33:32 +0000 (18:33 +0200)
* initialize user variable with NULL
* add -u to option summary line

Signed-off-by: Ralph Boehme <rb@sernet.de>
etc/cnid_dbd/cmd_dbd.c

index 17df52a90f1a76fcd2d5473b0aec010c17b20e94..9e8e008ec0ce86da94d186f57309da9e002ae752 100644 (file)
@@ -93,7 +93,7 @@ static void set_signal(void)
 
 static void usage (void)
 {
-    printf("Usage: dbd [-cfFstvV] <path to netatalk volume>\n\n"
+    printf("Usage: dbd [-cfFstuvV] <path to netatalk volume>\n\n"
            "dbd scans all file and directories of AFP volumes, updating the\n"
            "CNID database of the volume. dbd must be run with appropiate\n"
            "permissions i.e. as root.\n\n"
@@ -138,7 +138,7 @@ int main(int argc, char **argv)
     AFPObj obj = { 0 };
     struct vol *vol = NULL;
     const char *volpath = NULL;
-    char *username;
+    char *username = NULL;
     int c;
     while ((c = getopt(argc, argv, ":cfF:rstu:vV")) != -1) {
         switch(c) {