]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
mktemp,seq: prefer signed types
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 1 Aug 2023 00:43:05 +0000 (17:43 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 1 Aug 2023 00:51:28 +0000 (17:51 -0700)
* src/mktemp.c (main):
* src/seq.c (main): Prefer signed types.

src/mktemp.c
src/seq.c

index 3ce3cf3a83fae40b9e361c2b9a21f32b99dec242..992d4a35113265a54a7193aec0eb589144c10589 100644 (file)
@@ -147,7 +147,6 @@ main (int argc, char **argv)
   char const *dest_dir_arg = nullptr;
   bool suppress_file_err = false;
   int c;
-  unsigned int n_args;
   char *template;
   char *suffix = nullptr;
   bool use_dest_dir = false;
@@ -203,7 +202,7 @@ main (int argc, char **argv)
         }
     }
 
-  n_args = argc - optind;
+  int n_args = argc - optind;
   if (2 <= n_args)
     {
       error (0, 0, _("too many templates"));
index 977702bb595fe8a0352012b60191f5717df6718e..2822d5c2cea7a637d7c1c31c477a1eb5bd00cdb5 100644 (file)
--- a/src/seq.c
+++ b/src/seq.c
@@ -620,7 +620,7 @@ main (int argc, char **argv)
         }
     }
 
-  unsigned int n_args = argc - optind;
+  int n_args = argc - optind;
   if (n_args < 1)
     {
       error (0, 0, _("missing operand"));