|
|
|
|
|
by JdeBP
3434 days ago
|
|
> systemd was using a magic value (-1) to represent an invalid mode_t value This is not a correct description of what happened, note. Kay Sievers originally used 0 to represent an invalid value. Lennart Poettering changed this to -1, because 0 is clearly not an invalid value. The bug resulted because he missed changing one of the comparison-against-zero validity checks. See https://news.ycombinator.com/item?id=13472516 |
|
Yes, that's exactly the kind of mistake that happens when you use magic values to represent invalid values instead of distinct types.