Expand a ternary operation in a printf() to mollify a Clang complaint.
authorDavid Griffith <dave@661.org>
Mon, 20 Aug 2018 15:37:32 +0000 (08:37 -0700)
committerDavid Griffith <dave@661.org>
Mon, 20 Aug 2018 15:37:32 +0000 (08:37 -0700)
src/dumb/dumb_output.c

index cd879129dc7ef3ef92484387e5fd80aaf9b0a3e6..7fdb357eae96b29f704307ecb38f4412149c3af1 100644 (file)
@@ -297,8 +297,12 @@ static bool will_print_blank(cell c)
 
 static void show_line_prefix(int row, char c)
 {
-    if (show_line_numbers)
-       printf((row == -1) ? ".." : "%02d", (row + 1) % 100);
+    if (show_line_numbers) {
+       if (row == -1)
+           printf("..");
+       else
+           printf("%02d", (row + 1) % 100);
+    }
     if (show_line_types)
        putchar(c);
     /* Add a separator char (unless there's nothing to separate).  */