]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Replace sscanf() by strtoul()
authorStefan Eßer <se@FreeBSD.org>
Sat, 26 Dec 2020 21:21:49 +0000 (22:21 +0100)
committerStefan Eßer <se@FreeBSD.org>
Sun, 27 Dec 2020 21:32:22 +0000 (22:32 +0100)
commit50fcb4ee771cabbae99bb3150b26484f3e573fab
tree815de7578e7f7a1b18fd258f188e697416df3f9a
parent3fee777ec5a2e91ffbd9b396e99edae386eb150e
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.
bin/stty/gfmt.c