Fix an unguarded else clause
authorAntonio Ospite <ao2@ao2.it>
Fri, 23 Jun 2017 14:27:17 +0000 (16:27 +0200)
committerAntonio Ospite <ao2@ao2.it>
Fri, 23 Jun 2017 14:27:17 +0000 (16:27 +0200)
This fixes a gcc warning:

xicursorset.c: In function ‘main’:
xicursorset.c:77:2: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
  else
  ^~~~
xicursorset.c:79:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘else’
   if (theme == NULL) {
   ^~

xicursorset.c

index e66644b..7c18c0f 100644 (file)
@@ -72,14 +72,15 @@ int main(int argc, char *argv[])
        }
 
 
        }
 
 
-       if (argc == 4)
+       if (argc == 4) {
                theme = argv[3];
                theme = argv[3];
-       else
+       } else {
                theme = XcursorGetTheme(dpy);
                if (theme == NULL) {
                        fprintf(stderr, "Can't get cursor theme.\n");
                        return EXIT_FAILURE;
                }
                theme = XcursorGetTheme(dpy);
                if (theme == NULL) {
                        fprintf(stderr, "Can't get cursor theme.\n");
                        return EXIT_FAILURE;
                }
+       }
 
        image = XcursorShapeLoadImage(shape, theme, size);
        if (image == NULL) {
 
        image = XcursorShapeLoadImage(shape, theme, size);
        if (image == NULL) {