Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ulog.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ulog.c b/ulog.c
index 296605d..b7300e7 100644
--- a/ulog.c
+++ b/ulog.c
@@ -35,12 +35,13 @@ static const char *ulog_default_ident(void)
FILE *self;
static char line[64];
char *p = NULL;
+ char *sbuf;
if ((self = fopen("/proc/self/status", "r")) != NULL) {
while (fgets(line, sizeof(line), self)) {
if (!strncmp(line, "Name:", 5)) {
- strtok(line, "\t\n");
- p = strtok(NULL, "\t\n");
+ strtok_r(line, "\t\n", &sbuf);
+ p = strtok_r(NULL, "\t\n", &sbuf);
break;
}
}