1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-18 02:55:12 +00:00

htons() is not needed when using getaddrinfo (sf.net #3055612)

patch sumbitted by Ben Kibbey
This commit is contained in:
Pavel Labath 2010-08-30 12:06:50 +02:00
parent 77d4a55dcc
commit 5e6a5fdb3c

View File

@ -258,7 +258,7 @@ int apcupsd_scan_arg(const char *arg)
if (sscanf(arg, "%63s %d", host, &port) != 2) if (sscanf(arg, "%63s %d", host, &port) != 2)
return 1; return 1;
apcupsd.port = htons(port); apcupsd.port = port;
strncpy(apcupsd.host, host, sizeof(apcupsd.host)); strncpy(apcupsd.host, host, sizeof(apcupsd.host));
return 0; return 0;
} }