diff options
Diffstat (limited to 'nick.c')
-rw-r--r-- | nick.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -11,12 +11,12 @@ void nick_init() { nicks = NULL; } -int nick_add(char *name) { +struct nick_t *nick_add(char *name) { struct nick_t *nick = malloc(sizeof(struct nick_t)); if(!nick) { char *error = strerror(errno); fprintf(stderr, "Could not allocate memory for nick: %s\n", error); - return 0; + return NULL; } if(nicks) { @@ -30,7 +30,7 @@ int nick_add(char *name) { nick->regexes = NULL; nick->next = NULL; - return 1; + return nick; } int nick_regex_add(struct nick_t *nick, char *re_s) { |