Initialize the `lasts' to NULL before calling strtok_r the first time.
With our strtok_r it's not necessary, but the man-page on SGIs says it should be done. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1791 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -157,7 +157,7 @@ sl_loop (SL_cmd *cmds, char *prompt)
|
||||
add_history(buf);
|
||||
count = 0;
|
||||
{
|
||||
char *foo;
|
||||
char *foo = NULL;
|
||||
char *p;
|
||||
|
||||
for(p = strtok_r (buf, " \t", &foo);
|
||||
|
Reference in New Issue
Block a user