diff options
author | Max Kellermann <max@duempel.org> | 2011-09-13 21:36:51 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-09-13 21:39:07 +0200 |
commit | b7d2d4cfe8b88174a7b1f41840ddc0b23dbd6a75 (patch) | |
tree | 13032fee9c1341f02a2318eb12e3356f87f74d74 /src/command.c | |
parent | a6c797ee4b8e83c031961b22e449f083e79fe7af (diff) | |
download | mpd-b7d2d4cfe8b88174a7b1f41840ddc0b23dbd6a75.tar.gz mpd-b7d2d4cfe8b88174a7b1f41840ddc0b23dbd6a75.tar.xz mpd-b7d2d4cfe8b88174a7b1f41840ddc0b23dbd6a75.zip |
database: don't allow uri==NULL
Add nonnull attributes and fix all callers.
Diffstat (limited to '')
-rw-r--r-- | src/command.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/command.c b/src/command.c index ad13d75bc..13b3d4ca0 100644 --- a/src/command.c +++ b/src/command.c @@ -963,7 +963,7 @@ handle_find(struct client *client, int argc, char *argv[]) } GError *error = NULL; - enum command_return ret = findSongsIn(client, NULL, list, &error) + enum command_return ret = findSongsIn(client, "", list, &error) ? COMMAND_RETURN_OK : print_error(client, error); @@ -987,7 +987,7 @@ handle_findadd(struct client *client, int argc, char *argv[]) GError *error = NULL; enum command_return ret = - findAddIn(client->player_control, NULL, list, &error) + findAddIn(client->player_control, "", list, &error) ? COMMAND_RETURN_OK : print_error(client, error); @@ -1011,7 +1011,7 @@ handle_search(struct client *client, int argc, char *argv[]) } GError *error = NULL; - enum command_return ret = searchForSongsIn(client, NULL, list, &error) + enum command_return ret = searchForSongsIn(client, "", list, &error) ? COMMAND_RETURN_OK : print_error(client, error); @@ -1036,7 +1036,7 @@ handle_count(struct client *client, int argc, char *argv[]) GError *error = NULL; enum command_return ret = - searchStatsForSongsIn(client, NULL, list, &error) + searchStatsForSongsIn(client, "", list, &error) ? COMMAND_RETURN_OK : print_error(client, error); @@ -1266,7 +1266,7 @@ handle_prioid(struct client *client, int argc, char *argv[]) static enum command_return handle_listall(struct client *client, G_GNUC_UNUSED int argc, char *argv[]) { - char *directory = NULL; + const char *directory = ""; if (argc == 2) directory = argv[1]; @@ -1537,7 +1537,7 @@ handle_seekid(struct client *client, G_GNUC_UNUSED int argc, char *argv[]) static enum command_return handle_listallinfo(struct client *client, G_GNUC_UNUSED int argc, char *argv[]) { - char *directory = NULL; + const char *directory = ""; if (argc == 2) directory = argv[1]; |