summaryrefslogtreecommitdiff
path: root/source3/lib/debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/debug.c')
-rw-r--r--source3/lib/debug.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/lib/debug.c b/source3/lib/debug.c
index 6c1bfea04f..51bb0d7541 100644
--- a/source3/lib/debug.c
+++ b/source3/lib/debug.c
@@ -429,8 +429,9 @@ static bool debug_parse_params(char **params)
/* Fill in new debug class levels */
for (; i < debug_num_classes && params[i]; i++) {
- if ((class_name=strtok(params[i],":")) &&
- (class_level=strtok(NULL, "\0")) &&
+ char *saveptr;
+ if ((class_name = strtok_r(params[i],":", &saveptr)) &&
+ (class_level = strtok_r(NULL, "\0", &saveptr)) &&
((ndx = debug_lookup_classname(class_name)) != -1)) {
DEBUGLEVEL_CLASS[ndx] = atoi(class_level);
DEBUGLEVEL_CLASS_ISSET[ndx] = True;