summaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorEric Andersen2002-03-20 16:10:54 +0000
committerEric Andersen2002-03-20 16:10:54 +0000
commit27eff033d20198f04ecf44af93988b89363650e4 (patch)
treeafbc6dae7fc900021865cbffd450b6e8fb2e8cc7 /coreutils
parentc7a3fb96d0936bbbedc428eafd3701edd219f70a (diff)
downloadbusybox-27eff033d20198f04ecf44af93988b89363650e4.zip
busybox-27eff033d20198f04ecf44af93988b89363650e4.tar.gz
Eliminate extra trailing space
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/uname.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/coreutils/uname.c b/coreutils/uname.c
index 0f3a7d5..b45f4d1 100644
--- a/coreutils/uname.c
+++ b/coreutils/uname.c
@@ -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;