View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0008049 | GNUnet | util library | public | 2024-01-09 18:17 | 2024-03-07 20:26 |
Reporter | fefe | Assigned To | Christian Grothoff | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Fixed in Version | 0.21.0 | ||||
Summary | 0008049: GNUNET_STRINGS_parse_ipv4_policy: confusing code | ||||
Description | This is in gnunet/src/lib/util/strings.c: ``` 1300 int slash; 1416 /* try third notation */ 1417 slash = 32; 1440 while (slash > 0) 1441 { 1442 result[i].netmask.s_addr = (result[i].netmask.s_addr >> 1) + 0x80000000; 1443 slash--; 1444 } ``` slash will always be 32 when we enter the while-loop in line 1440. It looks like we could just set netmask.s_addr to 0xffffffff and get rid of the while loop? | ||||
Tags | No tags attached. | ||||
|
Setting more than one bit at a time might overheat the CPU ;-). |
|
Fixed with tons of other style fixes for that function in 9746a780b..407286ffd |
|
0.21 released |
Date Modified | Username | Field | Change |
---|---|---|---|
2024-01-09 18:17 | fefe | New Issue | |
2024-01-09 20:09 | Christian Grothoff | Note Added: 0020854 | |
2024-01-09 20:09 | Christian Grothoff | Assigned To | => Christian Grothoff |
2024-01-09 20:09 | Christian Grothoff | Status | new => resolved |
2024-01-09 20:09 | Christian Grothoff | Resolution | open => fixed |
2024-01-09 20:09 | Christian Grothoff | Note Added: 0020855 | |
2024-01-09 20:10 | Christian Grothoff | Project | Taler => GNUnet |
2024-01-09 20:10 | Christian Grothoff | Category | other => util library |
2024-03-07 20:26 | schanzen | Fixed in Version | => 0.21.0 |
2024-03-07 20:26 | schanzen | Note Added: 0021797 | |
2024-03-07 20:26 | schanzen | Status | resolved => closed |