From ce768385713db023e874db420b034dcbe94b5d48 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Wed, 27 Jun 2018 22:29:13 +1200 Subject: Remove old byte-order switching code It's safe enough to assume that UNIX domain sockets imply both ends of the socket have the same represenatations. Anyone doing hackery with forwarding/proxying UNIX domain sockets between systems should know better. --- alarmd/alarmd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'alarmd') diff --git a/alarmd/alarmd.c b/alarmd/alarmd.c index 3f95142..d1cef7d 100644 --- a/alarmd/alarmd.c +++ b/alarmd/alarmd.c @@ -140,7 +140,7 @@ int handle_query(int c_sock) struct alarm *tmp = NULL; /* LOCK */ - count = htonl(HASH_COUNT(alarms)); + count = HASH_COUNT(alarms); if (send(c_sock, &count, sizeof(count), 0) < sizeof(count)) { perror("send"); @@ -229,7 +229,6 @@ int main(int argc, char **argv) fprintf(stderr, "Packet type too short\n"); return 1; } - packet_type = ntohl(packet_type); switch(packet_type) { case ALARMD_PACKET_TYPE_REGISTER: -- cgit v1.1