/[packages]/cauldron/dhcp/pristine/SOURCES/dhcp-4.2.4-64_bit_lease_parse.patch
ViewVC logotype

Contents of /cauldron/dhcp/pristine/SOURCES/dhcp-4.2.4-64_bit_lease_parse.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 522970 - (show annotations) (download)
Fri Oct 18 22:44:24 2013 UTC (10 years, 5 months ago) by schedbot
File size: 2498 byte(s)
Copying release 3:4.2.5P1-2.mga4 to pristine/ directory.
1 diff -up dhcp-4.2.4b1/common/parse.c.64-bit_lease_parse dhcp-4.2.4b1/common/parse.c
2 --- dhcp-4.2.4b1/common/parse.c.64-bit_lease_parse 2012-03-09 12:28:10.000000000 +0100
3 +++ dhcp-4.2.4b1/common/parse.c 2012-04-16 17:30:55.867045149 +0200
4 @@ -906,8 +906,8 @@ TIME
5 parse_date_core(cfile)
6 struct parse *cfile;
7 {
8 - int guess;
9 - int tzoff, year, mon, mday, hour, min, sec;
10 + TIME guess;
11 + long int tzoff, year, mon, mday, hour, min, sec;
12 const char *val;
13 enum dhcp_token token;
14 static int months[11] = { 31, 59, 90, 120, 151, 181,
15 @@ -933,7 +933,7 @@ parse_date_core(cfile)
16 }
17
18 token = next_token(&val, NULL, cfile); /* consume number */
19 - guess = atoi(val);
20 + guess = atol(val);
21
22 return((TIME)guess);
23 }
24 @@ -961,7 +961,7 @@ parse_date_core(cfile)
25 somebody invents a time machine, I think we can safely disregard
26 it. This actually works around a stupid Y2K bug that was present
27 in a very early beta release of dhcpd. */
28 - year = atoi(val);
29 + year = atol(val);
30 if (year > 1900)
31 year -= 1900;
32
33 @@ -985,7 +985,7 @@ parse_date_core(cfile)
34 return((TIME)0);
35 }
36 token = next_token(&val, NULL, cfile); /* consume month */
37 - mon = atoi(val) - 1;
38 + mon = atol(val) - 1;
39
40 /* Slash separating month from day... */
41 token = peek_token(&val, NULL, cfile);
42 @@ -1007,7 +1007,7 @@ parse_date_core(cfile)
43 return((TIME)0);
44 }
45 token = next_token(&val, NULL, cfile); /* consume day of month */
46 - mday = atoi(val);
47 + mday = atol(val);
48
49 /* Hour... */
50 token = peek_token(&val, NULL, cfile);
51 @@ -1018,7 +1018,7 @@ parse_date_core(cfile)
52 return((TIME)0);
53 }
54 token = next_token(&val, NULL, cfile); /* consume hour */
55 - hour = atoi(val);
56 + hour = atol(val);
57
58 /* Colon separating hour from minute... */
59 token = peek_token(&val, NULL, cfile);
60 @@ -1040,7 +1040,7 @@ parse_date_core(cfile)
61 return((TIME)0);
62 }
63 token = next_token(&val, NULL, cfile); /* consume minute */
64 - min = atoi(val);
65 + min = atol(val);
66
67 /* Colon separating minute from second... */
68 token = peek_token(&val, NULL, cfile);
69 @@ -1062,13 +1062,13 @@ parse_date_core(cfile)
70 return((TIME)0);
71 }
72 token = next_token(&val, NULL, cfile); /* consume second */
73 - sec = atoi(val);
74 + sec = atol(val);
75
76 tzoff = 0;
77 token = peek_token(&val, NULL, cfile);
78 if (token == NUMBER) {
79 token = next_token(&val, NULL, cfile); /* consume tzoff */
80 - tzoff = atoi(val);
81 + tzoff = atol(val);
82 } else if (token != SEMI) {
83 token = next_token(&val, NULL, cfile);
84 parse_warn(cfile,

  ViewVC Help
Powered by ViewVC 1.1.30