aboutsummaryrefslogtreecommitdiff
path: root/alarmd
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2018-06-27 22:29:13 +1200
committerDavid Phillips <david@sighup.nz>2018-06-27 22:29:13 +1200
commitce768385713db023e874db420b034dcbe94b5d48 (patch)
tree1c6fd13f89af89697942b8340bd6753f78055e11 /alarmd
parent79e165107f67a4df7ba71fb3266eed55155a20c4 (diff)
downloadalarmd-ce768385713db023e874db420b034dcbe94b5d48.tar.xz
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.
Diffstat (limited to 'alarmd')
-rw-r--r--alarmd/alarmd.c3
1 files changed, 1 insertions, 2 deletions
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: