summaryrefslogtreecommitdiff
path: root/nick.c
diff options
context:
space:
mode:
Diffstat (limited to 'nick.c')
-rw-r--r--nick.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/nick.c b/nick.c
index f1d2c38..17335d0 100644
--- a/nick.c
+++ b/nick.c
@@ -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) {