From b7d2d4cfe8b88174a7b1f41840ddc0b23dbd6a75 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 13 Sep 2011 21:36:51 +0200 Subject: database: don't allow uri==NULL Add nonnull attributes and fix all callers. --- src/command.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/command.c') 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]; -- cgit v1.2.3