express: Remove need for extra int variable

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2015-07-22 08:30:36 -04:00
parent 63a011f9e2
commit 3fc1ec5609
1 changed files with 5 additions and 6 deletions

View File

@ -997,17 +997,16 @@ _channel_text_append(Channel *chl, const char *user, const char *txt, Row_Color
if (user)
{
/* If user is * ie for messages use a different color */
int user_color = 31;
Row_Color *ucolor;
if (strncmp(user, "*", strlen(user)) == 0)
{
user_color = 78;
}
if (!strncmp(user, "*", strlen(user)))
ucolor = _row_color_simple_create(78);
else
ucolor = _row_color_simple_create(31);
ucolor = _row_color_simple_create(user_color);
_grid_text_append(chl->o_grid, user, strlen(user), ucolor);
_grid_text_append(chl->o_grid, "\t", strlen("\t"), ucolor);
if (ucolor) free(ucolor);
}