]> git.baikalelectronics.ru Git - kernel.git/commit
Staging: hv: util: kvp: Cleanup kvp_get_domain_name()
authorK. Y. Srinivasan <kys@microsoft.com>
Tue, 26 Jul 2011 18:03:10 +0000 (11:03 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 23 Aug 2011 23:19:37 +0000 (16:19 -0700)
commite7e0dda11421c638c7d0ab708879a7525b3310e1
tree9e1cf96e367381edd937159aaf91ff276d68d3ad
parentf2b9bea13d4a46e8f447808df2bada48636565b3
Staging: hv: util: kvp: Cleanup kvp_get_domain_name()

Cleanup kvp_get_domain_name(). If getaddrinfo() fails, deal with it properly
(this can happen if no IP address has been assigned). Also, don't specify
a specific service in the call to getaddrinfo() to make this code as generic
as possible. Lastly, move the call to gethostname() after the local variables.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/hv/tools/hv_kvp_daemon.c