tree-diff: convert diff_root_tree_sha1 to struct object_id
[gitweb.git] / ident.c
diff --git a/ident.c b/ident.c
index c0364fe3a1630086e0e3752fe3e7e51e2027ea44..bea871c8e02b7173eeba5527d22f5ae7783c011e 100644 (file)
--- a/ident.c
+++ b/ident.c
@@ -120,9 +120,9 @@ static int canonical_name(const char *host, struct strbuf *out)
 
 static void add_domainname(struct strbuf *out, int *is_bogus)
 {
-       char buf[1024];
+       char buf[HOST_NAME_MAX + 1];
 
-       if (gethostname(buf, sizeof(buf))) {
+       if (xgethostname(buf, sizeof(buf))) {
                warning_errno("cannot get host name");
                strbuf_addstr(out, "(none)");
                *is_bogus = 1;