From 78a395d371ec9fd14297178ec98b8b1042a64fb6 Mon Sep 17 00:00:00 2001 From: Julian Phillips Date: Sat, 26 Jun 2010 00:41:35 +0100 Subject: string_list: Fix argument order for string_list_insert Update the definition and callers of string_list_insert to use the string_list as the first argument. This helps make the string_list API easier to use by being more consistent. Signed-off-by: Julian Phillips Signed-off-by: Junio C Hamano --- wt-status.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'wt-status.c') diff --git a/wt-status.c b/wt-status.c index 14e0acce8c..1653cfa9d6 100644 --- a/wt-status.c +++ b/wt-status.c @@ -232,7 +232,7 @@ static void wt_status_collect_changed_cb(struct diff_queue_struct *q, struct wt_status_change_data *d; p = q->queue[i]; - it = string_list_insert(p->one->path, &s->change); + it = string_list_insert(&s->change, p->one->path); d = it->util; if (!d) { d = xcalloc(1, sizeof(*d)); @@ -279,7 +279,7 @@ static void wt_status_collect_updated_cb(struct diff_queue_struct *q, struct wt_status_change_data *d; p = q->queue[i]; - it = string_list_insert(p->two->path, &s->change); + it = string_list_insert(&s->change, p->two->path); d = it->util; if (!d) { d = xcalloc(1, sizeof(*d)); @@ -346,7 +346,7 @@ static void wt_status_collect_changes_initial(struct wt_status *s) if (!ce_path_match(ce, s->pathspec)) continue; - it = string_list_insert(ce->name, &s->change); + it = string_list_insert(&s->change, ce->name); d = it->util; if (!d) { d = xcalloc(1, sizeof(*d)); @@ -381,7 +381,7 @@ static void wt_status_collect_untracked(struct wt_status *s) continue; if (!match_pathspec(s->pathspec, ent->name, ent->len, 0, NULL)) continue; - string_list_insert(ent->name, &s->untracked); + string_list_insert(&s->untracked, ent->name); free(ent); } @@ -395,7 +395,7 @@ static void wt_status_collect_untracked(struct wt_status *s) continue; if (!match_pathspec(s->pathspec, ent->name, ent->len, 0, NULL)) continue; - string_list_insert(ent->name, &s->ignored); + string_list_insert(&s->ignored, ent->name); free(ent); } } -- cgit v1.2.3