Merge from vendor branch GCC:
[dragonfly.git] / sbin / dhclient / common / parse.c.patch
1 $DragonFly: src/sbin/dhclient/common/Attic/parse.c.patch,v 1.1 2005/01/04 19:58:54 joerg Exp $
2 --- parse.c.orig        2004-06-17 22:54:38.000000000 +0200
3 +++ parse.c     2004-06-24 16:36:17.000000000 +0200
4 @@ -405,6 +405,7 @@
5  {
6         const char *val;
7         enum dhcp_token token;
8 +       int32_t num;
9  
10         token = next_token (&val, (unsigned *)0, cfile);
11         if (token != NUMBER) {
12 @@ -412,9 +413,9 @@
13                 skip_to_semi (cfile);
14                 return;
15         }
16 -       convert_num (cfile, (unsigned char *)timep, val, 10, 32);
17 +       convert_num (cfile, (unsigned char *)&num, val, 10, 32);
18         /* Unswap the number - convert_num returns stuff in NBO. */
19 -       *timep = ntohl (*timep); /* XXX */
20 +       *timep = ntohl (num);
21  
22         parse_semi (cfile);
23  }