diff --git a/dir.c b/dir.c index 8209f8b8af..1d42811cfb 100644 --- a/dir.c +++ b/dir.c @@ -1848,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);