Simple cleaning of sgivol, with no functional change (yet): - remove hardcoded constants - use strtol() and check for errors instead of using atoi() - use err()/errx()/warnx() when applicable - use bounded string operations whenever possible - use strncpy() instead of a home-grown construct
Simple cleaning of sgivol, with no functional change (yet):
- remove hardcoded constants
- use strtol() and check for errors instead of using atoi()
- use err()/errx()/warnx() when applicable
- use bounded string operations whenever possible
- use strncpy() instead of a home-grown construct

Plus you get the "/usr/mdec/sgivol -p" instant coredump fixed for free.

orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars