diff options
author | Roy Marples <roy@marples.name> | 2007-07-13 14:30:33 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-07-13 14:30:33 +0000 |
commit | 44e575845f55386af7d8cf9feab947344b39c439 (patch) | |
tree | 4937072238527ffa76af88b3171ece51d81beb08 /src | |
parent | cffbaa6c4e90835cf50be79ac304cccf27605b39 (diff) |
Don't use 'this' as a variable name as it confuses c++
Diffstat (limited to 'src')
-rw-r--r-- | src/librc-strlist.c | 22 | ||||
-rw-r--r-- | src/rc.h | 2 |
2 files changed, 12 insertions, 12 deletions
diff --git a/src/librc-strlist.c b/src/librc-strlist.c index 4c72cf45..ac861524 100644 --- a/src/librc-strlist.c +++ b/src/librc-strlist.c @@ -121,30 +121,30 @@ char **rc_strlist_delete (char **list, const char *item) } librc_hidden_def(rc_strlist_delete) -char **rc_strlist_join (char **this, char **that) +char **rc_strlist_join (char **list1, char **list2) { char **newlist; int i = 0; int j = 0; - if (! this && that) - return (that); - if (! that && this) - return (this); - if (! that && ! this) + if (! list1 && list2) + return (list2); + if (! list2 && list1) + return (list1); + if (! list1 && ! list2) return (NULL); - while (this[i]) + while (list1[i]) i++; - while (that[j]) + while (list2[j]) j++; - newlist = rc_xrealloc (this, sizeof (char *) * (i + j + 1)); + newlist = rc_xrealloc (list1, sizeof (char *) * (i + j + 1)); j = 0; - while (that[j]) { - newlist[i] = that[j]; + while (list2[j]) { + newlist[i] = list2[j]; i++; j++; } @@ -204,7 +204,7 @@ char **rc_strlist_addsort (char **list, const char *item); char **rc_strlist_addsortc (char **list, const char *item); char **rc_strlist_addsortu (char **list, const char *item); char **rc_strlist_delete (char **list, const char *item); -char **rc_strlist_join (char **this, char **that); +char **rc_strlist_join (char **list1, char **list2); void rc_strlist_reverse (char **list); void rc_strlist_free (char **list); |