diff options
author | TingPing <tingping@tingping.se> | 2014-12-31 11:31:17 -0500 |
---|---|---|
committer | TingPing <tingping@tingping.se> | 2014-12-31 11:31:17 -0500 |
commit | 2a282893140c0e838a4750da80198d07e355acc6 (patch) | |
tree | c67c878dff398fc96c7a1b263257497f31546902 /src/common | |
parent | 112632bb4ecfc54dba6346c1a9c3af9861c6a74b (diff) |
Don't return 0 in place of NULL
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/cfgfiles.c | 4 | ||||
-rw-r--r-- | src/common/dcc.c | 8 | ||||
-rw-r--r-- | src/common/hexchat.c | 4 | ||||
-rw-r--r-- | src/common/history.c | 10 | ||||
-rw-r--r-- | src/common/inbound.c | 8 | ||||
-rw-r--r-- | src/common/notify.c | 2 | ||||
-rw-r--r-- | src/common/outbound.c | 2 | ||||
-rw-r--r-- | src/common/userlist.c | 2 |
8 files changed, 20 insertions, 20 deletions
diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index 8ed31c4f..5de72dbd 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -207,10 +207,10 @@ cfg_get_str (char *cfg, const char *var, char *dest, int dest_len) while (*cfg != 0 && *cfg != '\n') cfg++; if (*cfg == 0) - return 0; + return NULL; cfg++; if (*cfg == 0) - return 0; + return NULL; } } diff --git a/src/common/dcc.c b/src/common/dcc.c index 8c6396b3..97cd5f14 100644 --- a/src/common/dcc.c +++ b/src/common/dcc.c @@ -494,7 +494,7 @@ dcc_write_chat (char *nick, char *text) fe_dcc_update (dcc); return dcc; } - return 0; + return NULL; } /* returns: 0 - ok @@ -1936,7 +1936,7 @@ find_dcc_from_id (int id, int type) return dcc; list = list->next; } - return 0; + return NULL; } static struct DCC * @@ -1952,7 +1952,7 @@ find_dcc_from_port (int port, int type) return dcc; list = list->next; } - return 0; + return NULL; } struct DCC * @@ -1977,7 +1977,7 @@ find_dcc (char *nick, char *file, int type) } list = list->next; } - return 0; + return NULL; } /* called when we receive a NICK change from server */ diff --git a/src/common/hexchat.c b/src/common/hexchat.c index fdae21d0..7d8e462f 100644 --- a/src/common/hexchat.c +++ b/src/common/hexchat.c @@ -209,7 +209,7 @@ find_dialog (server *serv, char *nick) } list = list->next; } - return 0; + return NULL; } session * @@ -227,7 +227,7 @@ find_channel (server *serv, char *chan) } list = list->next; } - return 0; + return NULL; } static void diff --git a/src/common/history.c b/src/common/history.c index 34924568..23a8463e 100644 --- a/src/common/history.c +++ b/src/common/history.c @@ -52,7 +52,7 @@ history_down (struct history *his) int next; if (his->pos == his->realpos) /* allow down only after up */ - return 0; + return NULL; if (his->realpos == 0) { if (his->pos == HISTORY_SIZE - 1) @@ -79,7 +79,7 @@ history_down (struct history *his) return his->lines[his->pos]; } - return 0; + return NULL; } char * @@ -90,11 +90,11 @@ history_up (struct history *his, char *current_text) if (his->realpos == HISTORY_SIZE - 1) { if (his->pos == 0) - return 0; + return NULL; } else { if (his->pos == his->realpos + 1) - return 0; + return NULL; } next = HISTORY_SIZE - 1; @@ -117,5 +117,5 @@ history_up (struct history *his, char *current_text) return his->lines[his->pos]; } - return 0; + return NULL; } diff --git a/src/common/inbound.c b/src/common/inbound.c index 720c7e9b..db68c64c 100644 --- a/src/common/inbound.c +++ b/src/common/inbound.c @@ -118,7 +118,7 @@ find_session_from_nick (char *nick, server *serv) } list = list->next; } - return 0; + return NULL; } static session * @@ -555,7 +555,7 @@ find_unused_session (server *serv) } list = list->next; } - return 0; + return NULL; } static session * @@ -573,7 +573,7 @@ find_session_from_waitchannel (char *chan, struct server *serv) } list = list->next; } - return 0; + return NULL; } void @@ -932,7 +932,7 @@ find_session_from_type (int type, server *serv) return sess; list = list->next; } - return 0; + return NULL; } void diff --git a/src/common/notify.c b/src/common/notify.c index b7c56573..b5316c36 100644 --- a/src/common/notify.c +++ b/src/common/notify.c @@ -196,7 +196,7 @@ notify_find (server *serv, char *nick) list = list->next; } - return 0; + return NULL; } static void diff --git a/src/common/outbound.c b/src/common/outbound.c index 0df9c37c..fab573e4 100644 --- a/src/common/outbound.c +++ b/src/common/outbound.c @@ -1654,7 +1654,7 @@ memrchr (const void *block, int c, size_t size) for (p = (unsigned char *)block + size; p != block; p--) if (*p == c) return p; - return 0; + return NULL; } #endif diff --git a/src/common/userlist.c b/src/common/userlist.c index aa0f8f16..54ed6f03 100644 --- a/src/common/userlist.c +++ b/src/common/userlist.c @@ -221,7 +221,7 @@ userlist_find_global (struct server *serv, char *name) } list = list->next; } - return 0; + return NULL; } static void |