From: Bill Spitzak Date: Fri, 8 Aug 2014 19:59:57 +0000 (-0700) Subject: weston-dnd --help works X-Git-Tag: 1.5.91~23 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6fd10c6c6cecc9416d91a96056eb83115c801ee6;p=platform%2Fupstream%2Fweston.git weston-dnd --help works --- diff --git a/clients/dnd.c b/clients/dnd.c index 620cfff..956c306 100644 --- a/clients/dnd.c +++ b/clients/dnd.c @@ -652,7 +652,14 @@ main(int argc, char *argv[]) { struct display *d; struct dnd *dnd; - int i; + int self_only = 0; + + if (argc == 2 && !strcmp(argv[1], "--self-only")) + self_only = 1; + else if (argc > 1) { + printf("Usage: %s [OPTIONS]\n --self-only\n", argv[0]); + return 1; + } d = display_create(&argc, argv); if (d == NULL) { @@ -661,10 +668,8 @@ main(int argc, char *argv[]) } dnd = dnd_create(d); - - for (i = 1; i < argc; i++) - if (strcmp("--self-only", argv[i]) == 0) - dnd->self_only = 1; + if (self_only) + dnd->self_only = 1; display_run(d);