commit: make it work with status.short
[gitweb.git] / builtin / config.c
index f881053cbbf6eec551aadf7280bc0e58717235ec..33c9bf9d84f514330f12de5cbd9dfb610a1b16de 100644 (file)
@@ -137,7 +137,8 @@ static int collect_config(const char *key_, const char *value_, void *cb)
                else
                        sprintf(value, "%d", v);
        } else if (types == TYPE_PATH) {
-               git_config_pathname(&vptr, key_, value_);
+               if (git_config_pathname(&vptr, key_, value_) < 0)
+                       return -1;
                must_free_vptr = 1;
        } else if (value_) {
                vptr = value_;
@@ -165,7 +166,7 @@ static int collect_config(const char *key_, const char *value_, void *cb)
 static int get_value(const char *key_, const char *regex_)
 {
        int ret = CONFIG_GENERIC_ERROR;
-       struct strbuf_list values = {0};
+       struct strbuf_list values = {NULL};
        int i;
 
        if (use_key_regexp) {