diff options
-rw-r--r-- | nick.c | 6 | ||||
-rw-r--r-- | nick.h | 2 |
2 files changed, 4 insertions, 4 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) { @@ -13,7 +13,7 @@ struct nick_t { }; void nick_init(); -int nick_add(char *name); +struct nick_t *nick_add(char *name); int nick_regex_add(struct nick_t *nick, char *re_s); void nick_free(); |