Optimization: Removed unneeded strlen() calls several places.

This commit is contained in:
Jan Vidar Krey
2009-03-02 19:41:49 +01:00
parent ac56e7a5b9
commit 26766d8332
6 changed files with 16 additions and 16 deletions

View File

@@ -79,7 +79,7 @@ void net_on_read(int fd, short ev, void *arg)
while ((pos = strchr(start, '\n')))
{
pos[0] = '\0';
if (strlen(start) > 0 && strlen(start) < user->hub->config->max_recv_buffer)
if (*start && strlen(start) < user->hub->config->max_recv_buffer)
{
if (hub_handle_message(user, start, &pos[0]-&start[0]) == -1)
{