mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 03:50:31 +00:00
add guideline comment about not using '%i' with scanf
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5501 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -24,6 +24,10 @@ Try to match the existing formatting of the file you are working on.
|
|||||||
Functions and variables that are not intended to be global must be
|
Functions and variables that are not intended to be global must be
|
||||||
declared static.
|
declared static.
|
||||||
|
|
||||||
|
When reading integer numeric input with scanf (or variants), do _NOT_ use '%i'
|
||||||
|
unless specifically want to allow non-base-10 input; '%d' is always a better
|
||||||
|
choice, since it will not silently turn numbers with leading zeros into base-8.
|
||||||
|
|
||||||
Roughly, Asterisk coding guidelines are generally equivalent to the
|
Roughly, Asterisk coding guidelines are generally equivalent to the
|
||||||
following:
|
following:
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user