rustybox
rustybox copied to clipboard
Lots of magic numbers
It seems like c2rust has removed a lot of the named constants so we've ended up with a bunch of magic numbers which are a lot less readable.
A good example might dumpkmap which has the following on line 77:
write(
1i32,
bb_common_bufsiz1.as_mut_ptr() as *const libc::c_void,
(7i32 + 256i32) as size_t,
);
Versus the busybox version:
write(
STDOUT_FILENO,
flags,
7 + MAX_NR_KEYMAPS
);
If and when someone gets c2rust refactor going this might be something good to tackle.
It's worth mentioning that there are also a bunch of constants that are "declared" but that are copied across many different files and modules. Ultimately these should be de-duped.