[Xfce4-commits] [apps/xfce4-taskmanager] 01/01: Use sizeof in get_hostname (bug 14401)
noreply at xfce.org
noreply at xfce.org
Sun May 27 11:05:04 CEST 2018
This is an automated email from the git hooks/post-receive script.
l a n d r y p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository apps/xfce4-taskmanager.
commit a76b13057cf8f273ee5f61707b4cf07983f9a6e3
Author: rim <rozhuk.im at gmail.com>
Date: Sun May 27 11:04:42 2018 +0200
Use sizeof in get_hostname (bug 14401)
---
src/task-manager.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/task-manager.c b/src/task-manager.c
index 4ebc83a..f33f326 100644
--- a/src/task-manager.c
+++ b/src/task-manager.c
@@ -633,7 +633,7 @@ get_hostname (void)
#define HOST_NAME_MAX 255
#endif
char hostname[HOST_NAME_MAX];
- if (gethostname (hostname, HOST_NAME_MAX))
+ if (gethostname (hostname, sizeof(hostname)))
return g_strdup ("(unknown)");
return g_strdup_printf ("%s", hostname);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list