mirror of
https://github.com/irssi/irssi.git
synced 2024-11-03 04:27:19 -05:00
Update NULL comparison style and be C89 compatible
This commit is contained in:
parent
1a49787ef2
commit
b0637ad6ea
@ -287,11 +287,13 @@ char *event_get_params(const char *data, int count, ...)
|
|||||||
/* Given a string containing <params>, strip any colon prefixing <trailing>. */
|
/* Given a string containing <params>, strip any colon prefixing <trailing>. */
|
||||||
static void strip_params_colon(char *const params)
|
static void strip_params_colon(char *const params)
|
||||||
{
|
{
|
||||||
if (!params) {
|
char *s;
|
||||||
|
|
||||||
|
if (params == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *s = params;
|
s = params;
|
||||||
while (*s != '\0') {
|
while (*s != '\0') {
|
||||||
if (*s == ':') {
|
if (*s == ':') {
|
||||||
memmove(s, s+1, strlen(s+1)+1);
|
memmove(s, s+1, strlen(s+1)+1);
|
||||||
@ -299,7 +301,7 @@ static void strip_params_colon(char *const params)
|
|||||||
}
|
}
|
||||||
|
|
||||||
s = strchr(s, ' ');
|
s = strchr(s, ' ');
|
||||||
if (!s) {
|
if (s == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user