summaryrefslogtreecommitdiffstats
path: root/lib/libcurses/tty/hashmap.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2002-06-22 18:13:05 +0000
committerderaadt <deraadt@openbsd.org>2002-06-22 18:13:05 +0000
commit4cd4f947543ba399d151320f57d67e58338d23b0 (patch)
treede0c3f8116931a98b75dc3102405cf7e0fc51c71 /lib/libcurses/tty/hashmap.c
parentuse process ID vs. pid/PID/process identifier (diff)
downloadwireguard-openbsd-4cd4f947543ba399d151320f57d67e58338d23b0.tar.xz
wireguard-openbsd-4cd4f947543ba399d151320f57d67e58338d23b0.zip
use strtok_r
Diffstat (limited to 'lib/libcurses/tty/hashmap.c')
-rw-r--r--lib/libcurses/tty/hashmap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libcurses/tty/hashmap.c b/lib/libcurses/tty/hashmap.c
index c57e36527cd..bf57cefdbe2 100644
--- a/lib/libcurses/tty/hashmap.c
+++ b/lib/libcurses/tty/hashmap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hashmap.c,v 1.6 2001/01/22 18:01:59 millert Exp $ */
+/* $OpenBSD: hashmap.c,v 1.7 2002/06/22 18:13:05 deraadt Exp $ */
/****************************************************************************
* Copyright (c) 1998,2000 Free Software Foundation, Inc. *
@@ -448,7 +448,7 @@ usage(void)
int
main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
{
- char line[BUFSIZ], *st;
+ char line[BUFSIZ], *st, *last;
int n;
SP = typeCalloc(SCREEN, 1);
@@ -480,11 +480,11 @@ main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED)
oldnums[n] = _NEWINDEX;
}
n = 0;
- st = strtok(line, " ");
+ st = strtok_r(line, " ", &last);
do {
oldnums[n++] = atoi(st);
} while
- ((st = strtok((char *) NULL, " ")) != 0);
+ ((st = strtok_r((char *) NULL, " "), &last) != 0);
break;
case 'n': /* use following letters as text of new lines */