Skip to content
Snippets Groups Projects
Commit 26fac036 authored by Danilo Spinella's avatar Danilo Spinella
Browse files

Add a 0 pointer to end the array of strings.

parent da243d76
No related branches found
No related tags found
No related merge requests found
...@@ -99,7 +99,7 @@ static inline void info_help (void) ...@@ -99,7 +99,7 @@ static inline void info_help (void)
static void parse_conf(void) static void parse_conf(void)
{ {
static char const *valid[] = static char const *valid[] =
{ "VERBOSITY", "PATH", "LIVE", "TREE", "RCINIT", "UMASK", "RESCAN" } ; { "VERBOSITY", "PATH", "LIVE", "TREE", "RCINIT", "UMASK", "RESCAN", 0 } ;
int r ; int r ;
unsigned int i = 0, j = 0 ; unsigned int i = 0, j = 0 ;
stralloc src = STRALLOC_ZERO ; stralloc src = STRALLOC_ZERO ;
...@@ -118,7 +118,7 @@ static void parse_conf(void) ...@@ -118,7 +118,7 @@ static void parse_conf(void)
r = env_split(&gaconf,&saconf,&src) ; r = env_split(&gaconf,&saconf,&src) ;
if (!r) sulogin("parse configuration file: ",confile) ; if (!r) sulogin("parse configuration file: ",confile) ;
for (;i < genalloc_len(diuint32,&gaconf) ; i++) for (;i < genalloc_len(diuint32,&gaconf) ; i++)
{ {
char *key = saconf.s + genalloc_s(diuint32,&gaconf)[i].left ; char *key = saconf.s + genalloc_s(diuint32,&gaconf)[i].left ;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment