Skip to content

Lots of magic numbers #16

Open
Open
@Akeboshiwind

Description

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.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions