Use size_t for wordc

* src/wordsplit.c (wordsplit_getwords): Word count is size_t
* src/wordsplit.h (wordsplit_getwords): Fix proto.
This commit is contained in:
Sergey Poznyakoff 2016-01-21 08:19:17 +02:00
parent 6d2bc16d3d
commit 85ece41c6d
2 changed files with 2 additions and 2 deletions

View file

@ -2283,7 +2283,7 @@ wordsplit_free (struct wordsplit *ws)
}
void
wordsplit_getwords (struct wordsplit *ws, int *wordc, char ***wordv)
wordsplit_getwords (struct wordsplit *ws, size_t *wordc, char ***wordv)
{
char **p = realloc (ws->ws_wordv,
(ws->ws_wordc + 1) * sizeof (ws->ws_wordv[0]));

View file

@ -235,7 +235,7 @@ int wordsplit_len (const char *s, size_t len, wordsplit_t *ws, int flags);
void wordsplit_free (wordsplit_t *ws);
void wordsplit_free_words (wordsplit_t *ws);
void wordsplit_free_envbuf (wordsplit_t *ws);
void wordsplit_getwords (wordsplit_t *ws, int *wordc, char ***wordv);
void wordsplit_getwords (wordsplit_t *ws, size_t *wordc, char ***wordv);
int wordsplit_c_unquote_char (int c);
int wordsplit_c_quote_char (int c);