Mercurial > code
diff c/strsep/strsep.c @ 648:5bd9424a523a
misc: extreme cleanup
author | David Demelier <markand@malikania.fr> |
---|---|
date | Thu, 04 Oct 2018 21:17:55 +0200 |
parents | b327391f6a62 |
children |
line wrap: on
line diff
--- a/c/strsep/strsep.c Wed Aug 01 14:08:40 2018 +0200 +++ b/c/strsep/strsep.c Thu Oct 04 21:17:55 2018 +0200 @@ -22,19 +22,19 @@ char * strsep(char **stringp, const char *delim) { - char *item, *ptr; + char *item, *ptr; - if (*stringp == NULL || delim[0] == '\0') - return NULL; + if (*stringp == NULL || delim[0] == '\0') + return NULL; - item = *stringp; - if ((ptr = strpbrk(*stringp, delim)) == NULL) { - *stringp = NULL; - return item; - } + item = *stringp; + if ((ptr = strpbrk(*stringp, delim)) == NULL) { + *stringp = NULL; + return item; + } - *ptr = '\0'; - *stringp = ptr + 1; + *ptr = '\0'; + *stringp = ptr + 1; - return item; + return item; }