HomeFreeBSD

Replace sscanf() by strtoul()

Description

Replace sscanf() by strtoul()

This change has been motivated by a mail from bde sent in 2015 in
which he mentioned inappropriate use of sscanf() in 3 programs in
/bin.

This change removes the potential mismatch of the types of the return
values and the variable width specified in the scan pattern. While
there was no issue with the patterns and types used, the new code is
simpler and more efficient.

Details

Provenance
seAuthored on Dec 26 2020, 9:21 PM
Parents
rG3fee777ec5a2: Simplify LS_COLWIDTHS processing
Branches
Unknown
Tags
Unknown