openexr: make architecture independent
[oi-userland.git] / components / mail / spfmilter / patches / 03_fix_int_format.patch
blobb4777def5eb981ee6843cfce95564eccde2a0a92
1 # fix at least all format warnings
2 --- spfmilter-2.001/iptab.c 2015-02-15 04:03:38.000000000 +0000
3 +++ spfmilter-2.001/iptab.c.new 2022-02-06 21:35:00.906962490 +0000
4 @@ -196,21 +196,21 @@
6 for ( i = 0; i < 8; ++i )
7 s[i] = 0;
8 - if ( sscanf( str, "%x:%x:%x:%x:%x:%x:%x:%x", &s[0], &s[1], &s[2], &s[3], &s[4], &s[5], &s[6], &s[7] ) == 8 )
9 + if ( sscanf( str, "%d:%d:%d:%d:%d:%d:%d:%d", &s[0], &s[1], &s[2], &s[3], &s[4], &s[5], &s[6], &s[7] ) == 8 )
10 w = 128;
11 - else if ( sscanf( str, "%x:%x:%x:%x:%x:%x:%x", &s[0], &s[1], &s[2], &s[3], &s[4], &s[5], &s[6] ) == 7 )
12 + else if ( sscanf( str, "%d:%d:%d:%d:%d:%d:%d", &s[0], &s[1], &s[2], &s[3], &s[4], &s[5], &s[6] ) == 7 )
13 w = 112;
14 - else if ( sscanf( str, "%x:%x:%x:%x:%x:%x", &s[0], &s[1], &s[2], &s[3], &s[4], &s[5] ) == 6 )
15 + else if ( sscanf( str, "%d:%d:%d:%d:%d:%d", &s[0], &s[1], &s[2], &s[3], &s[4], &s[5] ) == 6 )
16 w = 96;
17 - else if ( sscanf( str, "%x:%x:%x:%x:%x", &s[0], &s[1], &s[2], &s[3], &s[4] ) == 5 )
18 + else if ( sscanf( str, "%d:%d:%d:%d:%d", &s[0], &s[1], &s[2], &s[3], &s[4] ) == 5 )
19 w = 80;
20 - else if ( sscanf( str, "%x:%x:%x:%x", &s[0], &s[1], &s[2], &s[3] ) == 4 )
21 + else if ( sscanf( str, "%d:%d:%d:%d", &s[0], &s[1], &s[2], &s[3] ) == 4 )
22 w = 64;
23 - else if ( sscanf( str, "%x:%x:%x", &s[0], &s[1], &s[2] ) == 3 )
24 + else if ( sscanf( str, "%d:%d:%d", &s[0], &s[1], &s[2] ) == 3 )
25 w = 48;
26 - else if ( sscanf( str, "%x:%x", &s[0], &s[1] ) == 2 )
27 + else if ( sscanf( str, "%d:%d", &s[0], &s[1] ) == 2 )
28 w = 32;
29 - else if ( sscanf( str, "%x", &s[0] ) == 1 )
30 + else if ( sscanf( str, "%d", &s[0] ) == 1 )
31 w = 16;
32 else
33 w = 0;
34 @@ -292,7 +292,7 @@
35 slash = strchr( str, '/' );
36 if ( slash != (const char*) 0 )
38 - if ( sscanf( slash, "/%d", &ipa->prefixlen ) != 1 )
39 + if ( sscanf( slash, "/%x", &ipa->prefixlen ) != 1 )
41 err = ite_widthinvalid;
42 return false;