Code

player_command: handle_player_command() returns bool
authorMax Kellermann <max@duempel.org>
Mon, 28 Sep 2009 15:48:46 +0000 (17:48 +0200)
committerMax Kellermann <max@duempel.org>
Mon, 28 Sep 2009 15:48:46 +0000 (17:48 +0200)
src/player_command.c
src/player_command.h

index 29967957ab0e364db7284b49b26211cfa9131ba2..478d09073d5e6841c5e0ef210300daa6cbe28bc1 100644 (file)
 int seek_id = -1;
 int seek_target_time = 0;
 
-int
+bool
 handle_player_command(struct mpdclient *c, command_t cmd)
 {
        if (c->connection == NULL || c->status == NULL)
-               return 0;
+               return false;
 
        switch(cmd) {
                /*
@@ -126,8 +126,8 @@ handle_player_command(struct mpdclient *c, command_t cmd)
                break;
 
        default:
-               return 0;
+               return false;
        }
 
-       return 1;
+       return true;
 }
index 70d07fd5decf53059be5f8608f2229b20fef4152..d854515003b248df68a228c5bb9c024e9fa294ff 100644 (file)
 
 #include "command.h"
 
+#include <stdbool.h>
+
 struct mpdclient;
 
 extern int seek_id;
 extern int seek_target_time;
 
-int
+bool
 handle_player_command(struct mpdclient *c, command_t cmd);
 
 #endif