Signed-off-by: Alan Coopersmith <alan.coopersm...@oracle.com> --- smproxy.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/smproxy.c b/smproxy.c index 7c59f16..3ceb880 100644 --- a/smproxy.c +++ b/smproxy.c @@ -1168,17 +1168,27 @@ main (int argc, char *argv[]) continue; case 'c': /* -clientId */ - if (++i >= argc) goto usage; + if (++i >= argc) { + fprintf (stderr, "%s: -clientId requires an argument\n", + argv[0]); + goto usage; + } client_id = argv[i]; continue; case 'r': /* -restore */ - if (++i >= argc) goto usage; + if (++i >= argc) { + fprintf (stderr, "%s: -restore requires an argument\n", + argv[0]); + goto usage; + } restore_filename = argv[i]; continue; } } + fprintf (stderr, "%s: unrecognized argument: %s\n", argv[0], argv[i]); + usage: fprintf (stderr, -- 1.7.9.2 _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel