]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
unix.7: Use 'int' to iterate over 'argv'
authorAlejandro Colomar <alx@kernel.org>
Wed, 6 Mar 2024 11:23:32 +0000 (12:23 +0100)
committerAlejandro Colomar <alx@kernel.org>
Tue, 12 Mar 2024 17:23:30 +0000 (18:23 +0100)
'argc' is an 'int', so we should compare it with a variable of the same
type.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
man7/unix.7

index 122ee66596581ce43dd5d676f5d6f8c68924bbf7..1c4161f288468f56799372410b31ad9054edf118 100644 (file)
@@ -1159,7 +1159,7 @@ main(int argc, char *argv[])
 \&
     /* Send arguments. */
 \&
-    for (size_t i = 1; i < argc; ++i) {
+    for (int i = 1; i < argc; ++i) {
         ret = write(data_socket, argv[i], strlen(argv[i]) + 1);
         if (ret == \-1) {
             perror("write");