X-Git-Url: https://git.xinqibao.xyz/slstatus.git/blobdiff_plain/ee5ec756218c852385c5ba5ef0f75b47ba59ec39..825f637e20e98901447825ac44aa24859083fe00:/components/hostname.c

diff --git a/components/hostname.c b/components/hostname.c
index d41465f..dc3bbf1 100644
--- a/components/hostname.c
+++ b/components/hostname.c
@@ -10,7 +10,7 @@ const char *
 hostname(void)
 {
 	if (gethostname(buf, sizeof(buf)) < 0) {
-		fprintf(stderr, "gethostbyname: %s\n", strerror(errno));
+		warn("gethostbyname:");
 		return NULL;
 	}