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/locate.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/locate.h') diff --git a/src/locate.h b/src/locate.h index 6b544f243..ec20ded24 100644 --- a/src/locate.h +++ b/src/locate.h @@ -20,6 +20,8 @@ #ifndef MPD_LOCATE_H #define MPD_LOCATE_H +#include "gcc.h" + #include #include @@ -57,6 +59,7 @@ struct locate_item_list * locate_item_list_new(unsigned length); /* return number of items or -1 on error */ +gcc_nonnull(1) struct locate_item_list * locate_item_list_parse(char *argv[], int argc); @@ -64,19 +67,24 @@ locate_item_list_parse(char *argv[], int argc); * Duplicate the struct locate_item_list object and convert all * needles with g_utf8_casefold(). */ +gcc_nonnull(1) struct locate_item_list * locate_item_list_casefold(const struct locate_item_list *list); +gcc_nonnull(1) void locate_item_list_free(struct locate_item_list *list); +gcc_nonnull(1) void locate_item_free(struct locate_item *item); +gcc_nonnull(1,2) bool locate_song_search(const struct song *song, const struct locate_item_list *criteria); +gcc_nonnull(1,2) bool locate_song_match(const struct song *song, const struct locate_item_list *criteria); -- cgit v1.2.3