]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fixed build on FreeBSD v11.2 (#266) M-staged-PR266
authorTure Pålsson <ture@turepalsson.se>
Wed, 1 Aug 2018 15:34:09 +0000 (15:34 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Wed, 1 Aug 2018 18:05:33 +0000 (18:05 +0000)
... and other platforms where htonl() is a macro that uses its argument
multiple times (GCC -Werror=sequence-point).

src/wccp2.cc

index f17f728feb0652035491ee6923c2d8d9b6812337..eb36fc008299c3c9d5adcddcd7298a94b3a6377d 100644 (file)
@@ -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);