diff options
author | Max Kellermann <max@duempel.org> | 2008-09-10 11:42:30 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-10 11:42:30 +0200 |
commit | 1bb154098dc5b52163ebee2eeb224b736836a936 (patch) | |
tree | 2d27f5909a1fbef6c1932542e43f4008778c4a6c /src | |
parent | 48191d5661d1fa312f4e1e44569223ceb7bba596 (diff) | |
download | mpd-1bb154098dc5b52163ebee2eeb224b736836a936.tar.gz mpd-1bb154098dc5b52163ebee2eeb224b736836a936.tar.xz mpd-1bb154098dc5b52163ebee2eeb224b736836a936.zip |
client: client_input_received() returns 0
Since the caller chain doesn't care about the return value (except for
COMMAND_RETURN_KILL, COMMAND_RETURN_CLOSE), just return 0 if there is
nothing special. This saves one local variable initialization, and
one access to it.
Also remove one unreachable "return 1" from client_read().
Diffstat (limited to '')
-rw-r--r-- | src/client.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/client.c b/src/client.c index 2ec39dca1..d5a7ce616 100644 --- a/src/client.c +++ b/src/client.c @@ -400,7 +400,7 @@ static int client_process_line(struct client *client) static int client_input_received(struct client *client, int bytesRead) { - int ret = 0; + int ret; char *buf_tail = &(client->buffer[client->bufferLength - 1]); while (bytesRead > 0) { @@ -440,7 +440,7 @@ static int client_input_received(struct client *client, int bytesRead) } } - return ret; + return 0; } static int client_read(struct client *client) @@ -457,8 +457,6 @@ static int client_read(struct client *client) return COMMAND_RETURN_CLOSE; } else return 0; - - return 1; } static void client_manager_register_read_fd(fd_set * fds, int *fdmax) |