Revision ae80a2de lib/checksum.c

View differences:

lib/checksum.c
28 28
}
29 29

  
30 30
static u16
31
ipsum_calc_block(u32 *buf, unsigned len, u16 isum)
31
ipsum_calc_block(u32 *buf, uint len, u16 isum)
32 32
{
33 33
  /*
34 34
   *  A few simple facts about the IP checksum (see RFC 1071 for detailed
......
57 57
}
58 58

  
59 59
static u16
60
ipsum_calc(void *frag, unsigned len, va_list args)
60
ipsum_calc(void *frag, uint len, va_list args)
61 61
{
62 62
  u16 sum = 0;
63 63

  
......
67 67
      frag = va_arg(args, void *);
68 68
      if (!frag)
69 69
	break;
70
      len = va_arg(args, unsigned);
70
      len = va_arg(args, uint);
71 71
    }
72 72
  return sum;
73 73
}
......
87 87
 * Result: 1 if the checksum is correct, 0 else.
88 88
 */
89 89
int
90
ipsum_verify(void *frag, unsigned len, ...)
90
ipsum_verify(void *frag, uint len, ...)
91 91
{
92 92
  va_list args;
93 93
  u16 sum;
......
110 110
 * up checksum calculation as much as possible.
111 111
 */
112 112
u16
113
ipsum_calculate(void *frag, unsigned len, ...)
113
ipsum_calculate(void *frag, uint len, ...)
114 114
{
115 115
  va_list args;
116 116
  u16 sum;

Also available in: Unified diff