summaryrefslogtreecommitdiffstats
path: root/source/client
diff options
context:
space:
mode:
authorSteve French <stevef@smf-t60p.smfdom>2008-07-23 14:25:17 -0500
committerSteve French <stevef@smf-t60p.smfdom>2008-07-23 14:25:17 -0500
commit4b8362f9777debd21c47154e786b7017fbf847f7 (patch)
tree220655ba6a8f163e5fee4a0f7f2d90fbf591084b /source/client
parent5ab391d466ce9ddea31f6f6bf467aa6c5f3a7efb (diff)
downloadsamba-4b8362f9777debd21c47154e786b7017fbf847f7.tar.gz
samba-4b8362f9777debd21c47154e786b7017fbf847f7.tar.xz
samba-4b8362f9777debd21c47154e786b7017fbf847f7.zip
cifs.upcall: fix compile warning
Steve French noticed these warnings when building cifs.upcall: Compiling client/cifs.upcall.c client/cifs.upcall.c: In function 'usage': client/cifs.upcall.c:204: warning: declaration of 'prog' shadows a global declaration client/cifs.upcall.c:33: warning: shadowed declaration is here Change the usage function to not take and arg and have it just use the global "prog" variable. Fix a typo in the log message generated when an unknown option is specified. Also getopt() always returns '?' when it sees an unknown option so there's no point in printing it out. Signed-off-by: Jeff Layton <jlayton@redhat.com>
Diffstat (limited to 'source/client')
-rw-r--r--source/client/cifs.upcall.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/client/cifs.upcall.c b/source/client/cifs.upcall.c
index 3860f33e381..e3893260ddc 100644
--- a/source/client/cifs.upcall.c
+++ b/source/client/cifs.upcall.c
@@ -201,7 +201,7 @@ int cifs_resolver(const key_serial_t key, const char *key_descr)
}
void
-usage(const char *prog)
+usage()
{
syslog(LOG_WARNING, "Usage: %s [-c] [-v] key_serial", prog);
fprintf(stderr, "Usage: %s [-c] [-v] key_serial\n", prog);
@@ -234,7 +234,7 @@ int main(const int argc, char *const argv[])
goto out;
}
default:{
- syslog(LOG_WARNING, "unknow option: %c", c);
+ syslog(LOG_WARNING, "unknown option: %c", c);
goto out;
}
}
@@ -242,7 +242,7 @@ int main(const int argc, char *const argv[])
/* is there a key? */
if (argc <= optind) {
- usage(prog);
+ usage();
goto out;
}