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

Annotation of /cauldron/dhcp/pristine/SOURCES/dhcp-4.2.1-64_bit_lease_parse.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 223346 - (hide annotations) (download)
Wed Mar 14 12:00:40 2012 UTC (12 years, 1 month ago) by schedbot
File size: 2834 byte(s)
Copying release 3:4.2.3P2-4.mga2 to pristine/ directory.
1 guillomovitch 142667 diff -up dhcp-4.2.1b1/common/dispatch.c.64-bit_lease_parse dhcp-4.2.1b1/common/dispatch.c
2     diff -up dhcp-4.2.1b1/common/parse.c.64-bit_lease_parse dhcp-4.2.1b1/common/parse.c
3     --- dhcp-4.2.1b1/common/parse.c.64-bit_lease_parse 2010-12-30 00:01:42.000000000 +0100
4     +++ dhcp-4.2.1b1/common/parse.c 2011-01-28 08:01:10.000000000 +0100
5     @@ -909,8 +909,8 @@ TIME
6     parse_date_core(cfile)
7     struct parse *cfile;
8     {
9     - int guess;
10     - int tzoff, wday, year, mon, mday, hour, min, sec;
11     + TIME guess;
12     + long int tzoff, wday, year, mon, mday, hour, min, sec;
13     const char *val;
14     enum dhcp_token token;
15     static int months[11] = { 31, 59, 90, 120, 151, 181,
16     @@ -936,7 +936,7 @@ parse_date_core(cfile)
17     }
18    
19     token = next_token(&val, NULL, cfile); /* consume number */
20     - guess = atoi(val);
21     + guess = atol(val);
22    
23     return((TIME)guess);
24     }
25     @@ -948,7 +948,7 @@ parse_date_core(cfile)
26     return((TIME)0);
27     }
28     token = next_token(&val, NULL, cfile); /* consume day of week */
29     - wday = atoi(val);
30     + wday = atol(val);
31    
32     /* Year... */
33     token = peek_token(&val, NULL, cfile);
34     @@ -964,7 +964,7 @@ parse_date_core(cfile)
35     somebody invents a time machine, I think we can safely disregard
36     it. This actually works around a stupid Y2K bug that was present
37     in a very early beta release of dhcpd. */
38     - year = atoi(val);
39     + year = atol(val);
40     if (year > 1900)
41     year -= 1900;
42    
43     @@ -988,7 +988,7 @@ parse_date_core(cfile)
44     return((TIME)0);
45     }
46     token = next_token(&val, NULL, cfile); /* consume month */
47     - mon = atoi(val) - 1;
48     + mon = atol(val) - 1;
49    
50     /* Slash separating month from day... */
51     token = peek_token(&val, NULL, cfile);
52     @@ -1010,7 +1010,7 @@ parse_date_core(cfile)
53     return((TIME)0);
54     }
55     token = next_token(&val, NULL, cfile); /* consume day of month */
56     - mday = atoi(val);
57     + mday = atol(val);
58    
59     /* Hour... */
60     token = peek_token(&val, NULL, cfile);
61     @@ -1021,7 +1021,7 @@ parse_date_core(cfile)
62     return((TIME)0);
63     }
64     token = next_token(&val, NULL, cfile); /* consume hour */
65     - hour = atoi(val);
66     + hour = atol(val);
67    
68     /* Colon separating hour from minute... */
69     token = peek_token(&val, NULL, cfile);
70     @@ -1043,7 +1043,7 @@ parse_date_core(cfile)
71     return((TIME)0);
72     }
73     token = next_token(&val, NULL, cfile); /* consume minute */
74     - min = atoi(val);
75     + min = atol(val);
76    
77     /* Colon separating minute from second... */
78     token = peek_token(&val, NULL, cfile);
79     @@ -1065,13 +1065,13 @@ parse_date_core(cfile)
80     return((TIME)0);
81     }
82     token = next_token(&val, NULL, cfile); /* consume second */
83     - sec = atoi(val);
84     + sec = atol(val);
85    
86     tzoff = 0;
87     token = peek_token(&val, NULL, cfile);
88     if (token == NUMBER) {
89     token = next_token(&val, NULL, cfile); /* consume tzoff */
90     - tzoff = atoi(val);
91     + tzoff = atol(val);
92     } else if (token != SEMI) {
93     token = next_token(&val, NULL, cfile);
94     parse_warn(cfile,

  ViewVC Help
Powered by ViewVC 1.1.30