summaryrefslogtreecommitdiff
path: root/procps
diff options
context:
space:
mode:
Diffstat (limited to 'procps')
-rw-r--r--procps/mpstat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/procps/mpstat.c b/procps/mpstat.c
index 52a436a..c78c1f0 100644
--- a/procps/mpstat.c
+++ b/procps/mpstat.c
@@ -923,7 +923,7 @@ int mpstat_main(int argc UNUSED_PARAM, char **argv)
char *t;
G.p_option = 1;
- for (t = strtok(opt_set_cpu, ","); t; t = strtok(NULL, ",")) {
+ for (t = strtok_r(opt_set_cpu, ",", &opt_set_cpu); t; t = strtok_r(NULL, ",", &opt_set_cpu)) {
if (strcmp(t, "ALL") == 0) {
/* Select every CPU */
memset(G.cpu_bitmap, 0xff, G.cpu_bitmap_len);