Xinqi Bao's Git
projects
/
slstatus.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
| inline |
side by side
Fix coding style
[slstatus.git]
/
components
/
hostname.c
diff --git
a/components/hostname.c
b/components/hostname.c
index
d7c10c8
..
d41465f
100644
(file)
--- a/
components/hostname.c
+++ b/
components/hostname.c
@@
-9,7
+9,7
@@
const char *
hostname(void)
{
- if (gethostname(buf, sizeof(buf))
== -1
) {
+ if (gethostname(buf, sizeof(buf))
< 0
) {
fprintf(stderr, "gethostbyname: %s\n", strerror(errno));
return NULL;
}