Commit c5611128 authored by Joseph Noir's avatar Joseph Noir

Don't save unused return value

parent 99ef2a98
...@@ -180,8 +180,7 @@ std::string hostname() { ...@@ -180,8 +180,7 @@ std::string hostname() {
char buf[HOST_NAME_MAX + 1]; char buf[HOST_NAME_MAX + 1];
buf[HOST_NAME_MAX] = '\0'; buf[HOST_NAME_MAX] = '\0';
gethostname(buf, HOST_NAME_MAX); gethostname(buf, HOST_NAME_MAX);
struct hostent* h; gethostbyname(buf);
h = gethostbyname(buf);
return std::string{buf}; return std::string{buf};
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment