Merge branch 'db/send-pack-user-signingkey'
[gitweb.git] / dir.c
diff --git a/dir.c b/dir.c
index d318ffcb2a6a51feca5aee993049fd0fa64acc8f..1d42811cfb29009d75b95e4d24ebd67f5215e326 100644 (file)
--- a/dir.c
+++ b/dir.c
@@ -401,7 +401,6 @@ int report_path_error(const char *ps_matched,
        /*
         * Make sure all pathspec matched; otherwise it is an error.
         */
-       struct strbuf sb = STRBUF_INIT;
        int num, errors = 0;
        for (num = 0; num < pathspec->nr; num++) {
                int other, found_dup;
@@ -433,7 +432,6 @@ int report_path_error(const char *ps_matched,
                      pathspec->items[num].original);
                errors++;
        }
-       strbuf_release(&sb);
        return errors;
 }
 
@@ -1850,7 +1848,7 @@ static const char *get_ident_string(void)
 
        if (sb.len)
                return sb.buf;
-       if (uname(&uts))
+       if (uname(&uts) < 0)
                die_errno(_("failed to get kernel name and information"));
        strbuf_addf(&sb, "Location %s, system %s %s %s", get_git_work_tree(),
                    uts.sysname, uts.release, uts.version);