* fix test case a bit

* remove unnecessary cast
This commit is contained in:
Timothy Bess
2018-03-17 03:06:59 -04:00
parent f60fafe8fb
commit 898cf98ccc
3 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -344,7 +344,7 @@ pub extern "C" fn strtok(s1: *mut c_char, delimiter: *const c_char) -> *mut c_ch
let token = HAYSTACK;
HAYSTACK = strpbrk(token, delimiter);
if !HAYSTACK.is_null() {
HAYSTACK.write(0 as c_char);
HAYSTACK.write(0);
HAYSTACK = HAYSTACK.add(1);
} else {
HAYSTACK = ptr::null_mut();