]> err.no Git - util-linux/commitdiff
flock: fix printf format error in usage()
authorKarel Zak <kzak@redhat.com>
Wed, 11 Mar 2009 12:02:45 +0000 (13:02 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 11 Mar 2009 12:37:45 +0000 (13:37 +0100)
flock.c: In function ‘usage’:
flock.c:75: warning: too few arguments for format

Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/flock.c

index 3386e15b40ec9f7fc9fd291c0a019c3d343678ef..62bdf1adf784a0eac1601bfc0878f03406c64dee 100644 (file)
@@ -58,11 +58,11 @@ const char *program;
 
 static void usage(int ex)
 {
+  fputs("flock (" PACKAGE_STRING ")\n", stderr);
   fprintf(stderr,
-         "flock (%s)\n"
-         "Usage: %s [-sxun][-w #] fd#\n"
-         "       %s [-sxon][-w #] file [-c] command...\n"
-         "       %s [-sxon][-w #] directory [-c] command...\n"
+         "Usage: %1$s [-sxun][-w #] fd#\n"
+         "       %1$s [-sxon][-w #] file [-c] command...\n"
+         "       %1$s [-sxon][-w #] directory [-c] command...\n"
          "  -s  --shared     Get a shared lock\n"
          "  -x  --exclusive  Get an exclusive lock\n"
          "  -u  --unlock     Remove a lock\n"
@@ -72,7 +72,7 @@ static void usage(int ex)
          "  -c  --command    Run a single command string through the shell\n"
          "  -h  --help       Display this text\n"
          "  -V  --version    Display version\n",
-         PACKAGE_STRING, program, program);
+         program);
   exit(ex);
 }