diff options
author | José Bollo <jose.bollo@iot.bzh> | 2017-10-25 11:29:20 +0200 |
---|---|---|
committer | José Bollo <jose.bollo@iot.bzh> | 2017-10-25 11:29:20 +0200 |
commit | 1c7bbc7f2c7dd7e528371fdb6ccebdc3fd884e4f (patch) | |
tree | 65c21e43cfaeabd605eb244a4174715c6a33303f | |
parent | e8e37bb6e3cdc85dbab4e6cd97981340e50aa10c (diff) |
database: use PATH_MAX of system
Change-Id: I4b6567eb738c710109a2799f31575f83f5d852d1
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r-- | ll-database-binding/src/ll-database-binding.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/ll-database-binding/src/ll-database-binding.c b/ll-database-binding/src/ll-database-binding.c index 14b8b20..bbbba80 100644 --- a/ll-database-binding/src/ll-database-binding.c +++ b/ll-database-binding/src/ll-database-binding.c @@ -23,7 +23,7 @@ #include <pwd.h> #include <stdio.h> #include <string.h> -#include <linux/limits.h> +#include <limits.h> #include <json-c/json.h> #include <db.h> @@ -31,10 +31,6 @@ #define AFB_BINDING_VERSION 2 #include <afb/afb-binding.h> -#ifndef MAX_PATH -#define MAX_PATH 1024 -#endif - #define DBFILE "ll-database-binding.db" #if !defined(TO_STRING_FLAGS) @@ -92,7 +88,7 @@ static int get_database_path(char *buffer, size_t size) */ static int ll_database_binding_init() { - char path[MAX_PATH]; + char path[PATH_MAX]; int ret; ret = get_database_path(path, sizeof path); |