aboutsummaryrefslogtreecommitdiffstats
path: root/src/database.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-09-13 21:36:51 +0200
committerMax Kellermann <max@duempel.org>2011-09-13 21:39:07 +0200
commitb7d2d4cfe8b88174a7b1f41840ddc0b23dbd6a75 (patch)
tree13032fee9c1341f02a2318eb12e3356f87f74d74 /src/database.h
parenta6c797ee4b8e83c031961b22e449f083e79fe7af (diff)
downloadmpd-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 'src/database.h')
-rw-r--r--src/database.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/database.h b/src/database.h
index ab9114f2d..1696031d0 100644
--- a/src/database.h
+++ b/src/database.h
@@ -20,6 +20,8 @@
#ifndef MPD_DATABASE_H
#define MPD_DATABASE_H
+#include "gcc.h"
+
#include <glib.h>
#include <sys/time.h>
@@ -47,12 +49,15 @@ db_finish(void);
struct directory *
db_get_root(void);
+gcc_nonnull(1)
struct directory *
db_get_directory(const char *name);
+gcc_nonnull(1)
struct song *
db_get_song(const char *file);
+gcc_nonnull(1,2)
bool
db_walk(const char *uri,
const struct db_visitor *visitor, void *ctx,