]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(print_table_row): Use an unsigned type for widths
authorJim Meyering <jim@meyering.net>
Mon, 2 Sep 2002 07:31:24 +0000 (07:31 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 2 Sep 2002 07:31:24 +0000 (07:31 +0000)
to avoid warning about comparison between signed and unsigned.
(list_signals): Likewise.

src/kill.c

index 5f22a4fa896daccdf09d97ed558858c2c5c548fc..6595647f947804bfa67f11743357fea423895e49 100644 (file)
@@ -172,8 +172,8 @@ operand2sig (char const *operand, char *signame)
    maximum name width is NAME_WIDTH, and SIGNAME is the name to print.  */
 
 static void
-print_table_row (int num_width, int signum,
-                int name_width, char const *signame)
+print_table_row (unsigned int num_width, int signum,
+                unsigned int name_width, char const *signame)
 {
   char const *description = strsignal (signum);
   printf ("%*d %-*s %s\n", num_width, signum, name_width, signame,
@@ -193,10 +193,10 @@ list_signals (bool table, char *const *argv)
 
   if (table)
     {
-      int name_width = 0;
+      unsigned int name_width = 0;
 
       /* Compute the maximum width of a signal number.  */
-      int num_width = 1;
+      unsigned int num_width = 1;
       for (signum = 1; signum <= SIGNUM_BOUND / 10; signum *= 10)
        num_width++;