taskset: separate "current" and "new" strings
authorDenys Vlasenko <vda.linux@googlemail.com>
Sun, 29 Jan 2017 17:59:38 +0000 (18:59 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 29 Jan 2017 17:59:38 +0000 (18:59 +0100)
Better for constant sharing:

   text    data     bss     dec     hex filename
 912997     485    6856  920338   e0b12 busybox_old
 912988     485    6856  920329   e0b09 busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
miscutils/taskset.c

index a87b9bd431140462487f0cd4d7f14348083d0338..68b0fa6eb71d02abcf215c16a3b95f1e975337c0 100644 (file)
@@ -143,7 +143,7 @@ int taskset_main(int argc UNUSED_PARAM, char **argv)
 
        mask_size_in_bytes = SZOF_UL;
        mask = NULL;
-       current_new = "current\0new";
+       current_new = "current";
  print_aff:
        mask = get_aff(pid, &mask_size_in_bytes);
        if (opt_p) {
@@ -156,7 +156,7 @@ int taskset_main(int argc UNUSED_PARAM, char **argv)
                        return EXIT_SUCCESS;
                }
                *argv = NULL;
-               current_new += 8; /* "new" */
+               current_new = "new";
        }
        memset(mask, 0, mask_size_in_bytes);