aboutsummaryrefslogtreecommitdiff
path: root/engines/tsage/sound.cpp
diff options
context:
space:
mode:
authorChristoph Mallon2011-06-23 16:34:31 +0200
committerAlyssa Milburn2011-06-23 17:17:11 +0200
commit52ebc0da38856c3105d58920ced048e024fda1d7 (patch)
treec4709ad5f7da925aef6775145d5f2110154d7d46 /engines/tsage/sound.cpp
parent712af61f76148095cd3b8762eeb2b2b10502df1f (diff)
downloadscummvm-rg350-52ebc0da38856c3105d58920ced048e024fda1d7.tar.gz
scummvm-rg350-52ebc0da38856c3105d58920ced048e024fda1d7.tar.bz2
scummvm-rg350-52ebc0da38856c3105d58920ced048e024fda1d7.zip
BASE: Correct usage of strtol().
- endptr needs not be initialised before calling strtol(), it is always set by strtol(). - endptr is never a null pointer after calling strtol(). - There is no need to rely on strtol() setting EINVAL (which is not guaranteed). Testing whether strtol() parsed till the end of the string is sufficient (it is guaranteed that the string is not empty at this point). - It is sufficient to just test for ERANGE without inspecting the return value, because a successful call to strtol() does not change errno. Signed-off-by: Alyssa Milburn <fuzzie@fuzzie.org>
Diffstat (limited to 'engines/tsage/sound.cpp')
0 files changed, 0 insertions, 0 deletions