mirror of
https://github.com/irssi/irssi.git
synced 2026-08-11 04:43:34 +02:00
Factor strchr call.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4802 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
b2c8ba134b
commit
0b9a3f4aef
1 changed files with 4 additions and 2 deletions
|
|
@ -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)
|
static char *expando_chanmode(SERVER_REC *server, void *item, int *free_ret)
|
||||||
{
|
{
|
||||||
char *cmode;
|
char *cmode;
|
||||||
|
char *args;
|
||||||
|
|
||||||
*free_ret = FALSE;
|
*free_ret = FALSE;
|
||||||
|
|
||||||
|
|
@ -354,8 +355,9 @@ static char *expando_chanmode(SERVER_REC *server, void *item, int *free_ret)
|
||||||
|
|
||||||
*free_ret = TRUE;
|
*free_ret = TRUE;
|
||||||
cmode = g_strdup(CHANNEL(item)->mode);
|
cmode = g_strdup(CHANNEL(item)->mode);
|
||||||
if (strchr(cmode, ' ') != NULL)
|
args = strchr(cmode, ' ');
|
||||||
*(strchr(cmode, ' ')) = 0;
|
if (args != NULL)
|
||||||
|
*args = 0;
|
||||||
|
|
||||||
return cmode;
|
return cmode;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue