Fixed checkpatch warnings (coding style)
authorHugo Villeneuve <hugo@hugovil.com>
Sat, 1 Jun 2013 15:49:39 +0000 (11:49 -0400)
committerHugo Villeneuve <hugo@hugovil.com>
Sat, 1 Jun 2013 15:49:39 +0000 (11:49 -0400)
src/clock.c
src/options.c

index a8af97e..f86b025 100644 (file)
@@ -212,7 +212,8 @@ draw_clock_background(GtkWidget *clock, cairo_t *cr)
 
 static void
 draw_clock_hand_common(GtkWidget *clock, cairo_t *cr, double angle,
-                      double len_main_ratio, double len_ext_ratio, double width_ratio)
+                      double len_main_ratio, double len_ext_ratio,
+                      double width_ratio)
 {
        gint center_x, center_y;
        double sin_x, cos_y;
@@ -230,7 +231,7 @@ draw_clock_hand_common(GtkWidget *clock, cairo_t *cr, double angle,
 
        length = radius * len_ext_ratio;
        /*
-        * If optional extension len is non null, starting position is at the 
+        * If optional extension len is non null, starting position is at the
         * outer end of extension. Otherwise, starting position is at center.
         */
        cairo_move_to(cr, center_x - length * sin_x,
@@ -291,7 +292,9 @@ draw_clock_hands(GtkWidget *clock, cairo_t *cr)
                angle = M_PI / 30 * seconds;
                draw_clock_hand_common(clock, cr, angle,
                                       HAND_SECONDS_LENGTH1_RATIO,
-                                      HAND_SECONDS_LENGTH2_RATIO, /* Draw small extension */
+                                      HAND_SECONDS_LENGTH2_RATIO, /* Draw small
+                                                                   * extension
+                                                                   */
                                       HAND_SECONDS_WIDTH_RATIO);
        }
 
@@ -384,8 +387,9 @@ hvclock_expose(GtkWidget *clock, GdkEventExpose *event)
        if (hvclock_mode == CLOCK_MODE) {
                draw_clock_background(clock, cr);
                draw_clock_hands(clock, cr);
-       } else
+       } else {
                draw_calendar(clock, cr);
+       }
 
        cairo_destroy(cr);
 
index 154a037..bcf1d52 100644 (file)
@@ -50,8 +50,8 @@ static void DisplayUsage(void)
        printf("  -h                        display this help and exit\n");
        printf("  -n                        disable dockapp mode\n");
        printf("  -s                        display seconds hand\n");
-       printf("  -version                  display version information"
-              " and exit\n");
+       printf("  -version                  display version information");
+       printf(" and exit\n");
        printf("\n");
 }
 
@@ -137,8 +137,9 @@ void ParseCommandLineOptions(int argc, char *argv[])
                        } else if (geometry_on != false) {
                                geometry_on = false;
                                hvclock_infos.geometry_arg = token;
-                       } else
+                       } else {
                                InvalidOption("invalid option", token);
+                       }
                        break;
                }               /* end switch( token[0] ) */
        }                       /* end for */
@@ -147,5 +148,4 @@ void ParseCommandLineOptions(int argc, char *argv[])
                InvalidOption("missing display parameter", NULL);
        else if (geometry_on != false)
                InvalidOption("missing geometry parameter", NULL);
-
 }