/[packages]/cauldron/dhcp/current/SOURCES/dhcp-4.3.0-64_bit_lease_parse.patch
ViewVC logotype

Contents of /cauldron/dhcp/current/SOURCES/dhcp-4.3.0-64_bit_lease_parse.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 636554 - (show annotations) (download)
Sun Jun 15 15:59:35 2014 UTC (9 years, 9 months ago) by luigiwalser
File size: 2348 byte(s)
- 4.3.0
- rediff patches 101, 8, and 18

1 --- dhcp-4.3.0/common/parse.c.64-bit_lease_parse 2014-01-31 14:20:49.000000000 -0500
2 +++ dhcp-4.3.0/common/parse.c 2014-06-15 11:48:48.559669323 -0400
3 @@ -932,8 +932,8 @@ TIME
4 parse_date_core(cfile)
5 struct parse *cfile;
6 {
7 - int guess;
8 - int tzoff, year, mon, mday, hour, min, sec;
9 + TIME guess;
10 + long int tzoff, year, mon, mday, hour, min, sec;
11 const char *val;
12 enum dhcp_token token;
13 static int months[11] = { 31, 59, 90, 120, 151, 181,
14 @@ -959,7 +959,7 @@ parse_date_core(cfile)
15 }
16
17 skip_token(&val, NULL, cfile); /* consume number */
18 - guess = atoi(val);
19 + guess = atol(val);
20
21 return((TIME)guess);
22 }
23 @@ -987,7 +987,7 @@ parse_date_core(cfile)
24 somebody invents a time machine, I think we can safely disregard
25 it. This actually works around a stupid Y2K bug that was present
26 in a very early beta release of dhcpd. */
27 - year = atoi(val);
28 + year = atol(val);
29 if (year > 1900)
30 year -= 1900;
31
32 @@ -1011,7 +1011,7 @@ parse_date_core(cfile)
33 return((TIME)0);
34 }
35 skip_token(&val, NULL, cfile); /* consume month */
36 - mon = atoi(val) - 1;
37 + mon = atol(val) - 1;
38
39 /* Slash separating month from day... */
40 token = peek_token(&val, NULL, cfile);
41 @@ -1033,7 +1033,7 @@ parse_date_core(cfile)
42 return((TIME)0);
43 }
44 skip_token(&val, NULL, cfile); /* consume day of month */
45 - mday = atoi(val);
46 + mday = atol(val);
47
48 /* Hour... */
49 token = peek_token(&val, NULL, cfile);
50 @@ -1044,7 +1044,7 @@ parse_date_core(cfile)
51 return((TIME)0);
52 }
53 skip_token(&val, NULL, cfile); /* consume hour */
54 - hour = atoi(val);
55 + hour = atol(val);
56
57 /* Colon separating hour from minute... */
58 token = peek_token(&val, NULL, cfile);
59 @@ -1066,7 +1066,7 @@ parse_date_core(cfile)
60 return((TIME)0);
61 }
62 skip_token(&val, NULL, cfile); /* consume minute */
63 - min = atoi(val);
64 + min = atol(val);
65
66 /* Colon separating minute from second... */
67 token = peek_token(&val, NULL, cfile);
68 @@ -1088,13 +1088,13 @@ parse_date_core(cfile)
69 return((TIME)0);
70 }
71 skip_token(&val, NULL, cfile); /* consume second */
72 - sec = atoi(val);
73 + sec = atol(val);
74
75 tzoff = 0;
76 token = peek_token(&val, NULL, cfile);
77 if (token == NUMBER) {
78 skip_token(&val, NULL, cfile); /* consume tzoff */
79 - tzoff = atoi(val);
80 + tzoff = atol(val);
81 } else if (token != SEMI) {
82 skip_token(&val, NULL, cfile);
83 parse_warn(cfile,

  ViewVC Help
Powered by ViewVC 1.1.30