summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEmanuele Giaquinta <exg@irssi.org>2008-04-08 13:02:56 +0000
committerexg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564>2008-04-08 13:02:56 +0000
commit0b9a3f4aef00a8a20ed6d64569e5eca96ff3379e (patch)
tree4a8f81bb8b525a7c874ea4ecd2b4218ffecbfb86 /src
parentb2c8ba134b37d89cc8b5568954c861551cf39e68 (diff)
downloadirssi-0b9a3f4aef00a8a20ed6d64569e5eca96ff3379e.zip
Factor strchr call.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4802 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/core/expandos.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/expandos.c b/src/core/expandos.c
index 4c483ccd..bbebe993 100644
--- a/src/core/expandos.c
+++ b/src/core/expandos.c
@@ -343,6 +343,7 @@ static char *expando_cmdchar(SERVER_REC *server, void *item, int *free_ret)
static char *expando_chanmode(SERVER_REC *server, void *item, int *free_ret)
{
char *cmode;
+ char *args;
*free_ret = FALSE;
@@ -354,8 +355,9 @@ static char *expando_chanmode(SERVER_REC *server, void *item, int *free_ret)
*free_ret = TRUE;
cmode = g_strdup(CHANNEL(item)->mode);
- if (strchr(cmode, ' ') != NULL)
- *(strchr(cmode, ' ')) = 0;
+ args = strchr(cmode, ' ');
+ if (args != NULL)
+ *args = 0;
return cmode;
}