Eliminate extra trailing space
authorEric Andersen <andersen@codepoet.org>
Wed, 20 Mar 2002 16:10:54 +0000 (16:10 -0000)
committerEric Andersen <andersen@codepoet.org>
Wed, 20 Mar 2002 16:10:54 +0000 (16:10 -0000)
coreutils/uname.c

index 0f3a7d5c049209a6752bcbc72dcba6c0c9be1f64..b45f4d1562d575780309d3b42944238d478411fc 100644 (file)
@@ -96,12 +96,11 @@ int uname_main(int argc, char **argv)
 
        strcpy(uname_info.processor, "unknown");
 
-       for (delta=utsname_offset ; toprint ; delta++, toprint >>= 1) {
+       for (opt=0,delta=utsname_offset ; toprint ; delta++, toprint >>= 1) {
                if (toprint & 1) {
-                       printf("%s ", ((char *)(&uname_info)) + *delta );
+                       printf("%s%s", (opt++==0)? "": " ", ((char *)(&uname_info)) + *delta);
                }
        }
-
        putchar('\n');
 
        return EXIT_SUCCESS;