aboutsummaryrefslogtreecommitdiff
path: root/src/librc-strlist.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-09-25 17:32:12 +0000
committerRoy Marples <roy@marples.name>2007-09-25 17:32:12 +0000
commit6a14825e74c9abdbc024202543fd5fea0ca4a3de (patch)
tree5866d2d818fb6cb00515bcb5e39f8d6d050cc66b /src/librc-strlist.c
parentc6c7df47a00a8a974eb026f31e94bfc07984ac13 (diff)
Use bools
Diffstat (limited to 'src/librc-strlist.c')
-rw-r--r--src/librc-strlist.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/librc-strlist.c b/src/librc-strlist.c
index 9645acb0..34f454dd 100644
--- a/src/librc-strlist.c
+++ b/src/librc-strlist.c
@@ -110,26 +110,26 @@ char *rc_strlist_addsortu (char ***list, const char *item)
}
librc_hidden_def(rc_strlist_addsortu)
-int rc_strlist_delete (char ***list, const char *item)
+bool rc_strlist_delete (char ***list, const char *item)
{
char **lst = *list;
int i = 0;
- int retval = -1;
+ bool retval = false;
if (!lst || ! item)
- return (-1);
+ return (false);
while (lst[i])
if (! strcmp (lst[i], item)) {
free (lst[i]);
- retval = 0;
+ retval = true;
do {
lst[i] = lst[i + 1];
i++;
} while (lst[i]);
}
- if (retval)
+ if (! retval)
errno = ENOENT;
return (retval);
}