summaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
Diffstat (limited to 'git.c')
-rw-r--r--git.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/git.c b/git.c
index c620342..b070b14 100644
--- a/git.c
+++ b/git.c
@@ -151,7 +151,7 @@ void cleanup_pull_request(pull_request *pr) {
static linked_list *parse_dsv_str(const char *str, const char *delm) {
linked_list *tail = NULL;
- for (; *str != '\0'; str += strspn(str, delm)) {
+ for (; !is_empty(str); str = find_delm((char *)str, delm, 1)) {
/* Get the length of the token. */
size_t tok_len = strcspn(str, delm);
/* Create the token. */
@@ -160,8 +160,6 @@ static linked_list *parse_dsv_str(const char *str, const char *delm) {
memcpy(tok, str, tok_len);
/* Add the token to the list.. */
tail = add_node(&tail, tok);
- /* Move over the token. */
- str += tok_len;
}
return tail;
}