mirror of
git://git.gnu.org.ua/wordsplit.git
synced 2025-04-26 00:29:54 +03:00
Minor change
* tests/wsp.c (main): use additional variable to keep the allocated value in incremental mode.
This commit is contained in:
parent
3ad0ad462c
commit
ff39e877ee
1 changed files with 3 additions and 3 deletions
|
@ -184,7 +184,7 @@ wsp_getvar (const char *vptr, size_t vlen, void *data)
|
|||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
char buf[1024], *ptr;
|
||||
char buf[1024], *ptr, *saved_ptr;
|
||||
int i, offarg = 0;
|
||||
int trimnl_option = 0;
|
||||
int plaintext_option = 0;
|
||||
|
@ -366,13 +366,13 @@ main (int argc, char **argv)
|
|||
if (*ptr == 0)
|
||||
ptr = NULL;
|
||||
else
|
||||
free ((void*)ws.ws_input);
|
||||
free (saved_ptr);
|
||||
}
|
||||
else
|
||||
next_call = 1;
|
||||
if (ptr)
|
||||
{
|
||||
ptr = strdup (ptr);
|
||||
ptr = saved_ptr = strdup (ptr);
|
||||
assert (ptr != NULL);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue