Skip to content
Snippets Groups Projects
Commit 06de920b authored by Timothy Bess's avatar Timothy Bess
Browse files

* remove unnecessary assignments

parent e9189162
No related branches found
No related tags found
1 merge request!92Implement strtok
...@@ -373,7 +373,6 @@ pub extern "C" fn strtok_r( ...@@ -373,7 +373,6 @@ pub extern "C" fn strtok_r(
// Skip past any extra delimiter left over from previous call // Skip past any extra delimiter left over from previous call
haystack = haystack.add(strspn(haystack, delimiter)); haystack = haystack.add(strspn(haystack, delimiter));
if *haystack == 0 { if *haystack == 0 {
haystack = ptr::null_mut();
*lasts = ptr::null_mut(); *lasts = ptr::null_mut();
return ptr::null_mut(); return ptr::null_mut();
} }
...@@ -386,7 +385,6 @@ pub extern "C" fn strtok_r( ...@@ -386,7 +385,6 @@ pub extern "C" fn strtok_r(
haystack = haystack.add(1); haystack = haystack.add(1);
*lasts = haystack; *lasts = haystack;
} else { } else {
haystack = ptr::null_mut();
*lasts = ptr::null_mut(); *lasts = ptr::null_mut();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment