printf("%s\n") -> puts()
authorDenis Vlasenko <vda.linux@googlemail.com>
Mon, 1 Oct 2007 12:05:12 +0000 (12:05 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Mon, 1 Oct 2007 12:05:12 +0000 (12:05 -0000)
archival/unzip.c
coreutils/id.c
libbb/lineedit.c
miscutils/hdparm.c
networking/nslookup.c
selinux/matchpathcon.c
util-linux/losetup.c

index 97c743c438d65852c5bd1bfad9d39fc24d2be5fd..21d4c2535ec8c1ba32e1a0867d7cb5f68c719b6c 100644 (file)
@@ -263,9 +263,9 @@ int unzip_main(int argc, char **argv)
                        total_size += zip_header.formatted.ucmpsize;
 
                        if (listing) { /* List entry */
-                           if (verbose) {
-                               unsigned int dostime = zip_header.formatted.modtime | (zip_header.formatted.moddate << 16);
-                               printf("%9u  %02u-%02u-%02u %02u:%02u   %s\n",
+                               if (verbose) {
+                                       unsigned int dostime = zip_header.formatted.modtime | (zip_header.formatted.moddate << 16);
+                                       printf("%9u  %02u-%02u-%02u %02u:%02u   %s\n",
                                           zip_header.formatted.ucmpsize,
                                           (dostime & 0x01e00000) >> 21,
                                           (dostime & 0x001f0000) >> 16,
@@ -273,12 +273,12 @@ int unzip_main(int argc, char **argv)
                                           (dostime & 0x0000f800) >> 11,
                                           (dostime & 0x000007e0) >> 5,
                                           dst_fn);
-                               total_entries++;
-                           } else {
-                               /* short listing -- filenames only */
-                               printf("%s\n", dst_fn);
-                           }
-                           i = 'n';
+                                       total_entries++;
+                               } else {
+                                       /* short listing -- filenames only */
+                                       puts(dst_fn);
+                               }
+                               i = 'n';
                        } else if (dst_fd == STDOUT_FILENO) { /* Extracting to STDOUT */
                                i = -1;
                        } else if (last_char_is(dst_fn, '/')) { /* Extract directory */
index 536e946c073d33b7eb9a031b8cc1d0b9ad7da14d..f72a027fa945450f26a608806a09f3f39842e5b8 100644 (file)
@@ -92,7 +92,7 @@ int id_main(int argc, char **argv)
                        if (getcon(&scontext)) {
                                bb_error_msg_and_die("can't get process context");
                        }
-                       printf("%s\n", scontext);
+                       puts(scontext);
                }
 #endif
                /* exit */
index 26a49a1c32c22fc90cc39bb63e4ef0a5f4f0ca24..ccf8ac52d6296aeed5a7f8b1249bee924ee1601b 100644 (file)
@@ -700,7 +700,7 @@ static void showfiles(void)
                        printf("%s%-*s", matches[n],
                                (int)(column_width - strlen(matches[n])), "");
                }
-               printf("%s\n", matches[n]);
+               puts(matches[n]);
        }
 }
 
index cb6db78cd2b6ea25ee41d732717bf37e9a5a999c..365e24cbae6840522582044a9d108e79919268b6 100644 (file)
@@ -849,7 +849,7 @@ static void identify(uint16_t *val)
                                jj >>= 1;
                        }
                }
-               printf("%s\n", kk ? "" : "\n\tLikely used CD-ROM ATAPI-1");
+               puts(kk ? "" : "\n\tLikely used CD-ROM ATAPI-1");
                /* the cdrom stuff is more like ATA-2 than anything else, so: */
                like_std = 2;
        }
index e5bb56f81cad99bb68e3bb6020d82e5660cc82f4..fab7e3efc46c7150e557fabb7c22d7bc63c64761 100644 (file)
@@ -69,7 +69,7 @@ static int print_host(const char *hostname, const char *header)
                unsigned cnt = 0;
 
                printf("%-10s %s\n", header, hostname);
-               // printf("%s\n", cur->ai_canonname); ?
+               // puts(cur->ai_canonname); ?
                while (cur) {
                        char *dotted, *revhost;
                        dotted = xmalloc_sockaddr2dotted_noport(cur->ai_addr);
index 2bc0a33049e6a789fa04c1816092215c795cedb6..bb7099ea64e44624345941a1158c7ec512efa954 100644 (file)
@@ -17,7 +17,7 @@ static int print_matchpathcon(char *path, int noprint)
        if (!noprint)
                printf("%s\t%s\n", path, buf);
        else
-               printf("%s\n", buf);
+               puts(buf);
 
        freecon(buf);
        return 0;
index 57e8569dc3c218829d196834c956a61be639120f..c61af3d29ff6bdc40dd64fd0672a4364fc510f7a 100644 (file)
@@ -64,7 +64,7 @@ int losetup_main(int argc, char **argv)
                s = query_loop(dev);
                if (!s) {
                        if (opt == 0x4) {
-                               printf("%s\n", dev);
+                               puts(dev);
                                return EXIT_SUCCESS;
                        }
                } else {