Skip to content

Commit

Permalink
Fixed build on FreeBSD v11.2 (#266)
Browse files Browse the repository at this point in the history
... and other platforms where htonl() is a macro that uses its argument
multiple times (GCC -Werror=sequence-point).
  • Loading branch information
turepalsson authored and squid-anubis committed Aug 1, 2018
1 parent 4f1c93a commit 7f7b4fd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/wccp2.cc
Expand Up @@ -1743,7 +1743,8 @@ wccp2AssignBuckets(void *)

assignment_key = (struct assignment_key_t *) &wccp_packet[offset];

assignment_key->master_number = htonl(++service_list_ptr->change_num);
++service_list_ptr->change_num;
assignment_key->master_number = htonl(service_list_ptr->change_num);

offset += sizeof(struct assignment_key_t);

Expand Down

0 comments on commit 7f7b4fd

Please sign in to comment.