patch-traceroute_csum_c 514 B

1234567891011121314151617
  1. --- traceroute-2.0.19.orig/traceroute/csum.c 2007-07-19 16:47:55.000000000 +0200
  2. +++ traceroute-2.0.19/traceroute/csum.c 2013-12-29 20:01:35.000000000 +0100
  3. @@ -12,11 +12,11 @@
  4. #include "traceroute.h"
  5. -u_int16_t in_csum (const void *ptr, size_t len) {
  6. - const u_int16_t *p = (const u_int16_t *) ptr;
  7. +uint16_t in_csum (const void *ptr, size_t len) {
  8. + const uint16_t *p = (const uint16_t *) ptr;
  9. size_t nw = len / 2;
  10. unsigned int sum = 0;
  11. - u_int16_t res;
  12. + uint16_t res;
  13. while (nw--) sum += *p++;