diff options
| author | Adrian Negreanu <adrian.m.negreanu@intel.com> | 2013-12-17 13:48:54 +0200 |
|---|---|---|
| committer | Kristian Høgsberg <krh@bitplanet.net> | 2013-12-17 10:57:52 -0800 |
| commit | cd0dccd01e16fa404e03974d30ded3aebdb1c4bc (patch) | |
| tree | b3ed5f6bbda7f72f253234f8f0a583a2bdf8e933 /src | |
| parent | configure.ac: Bump version to 1.3.91 for the alpha release (diff) | |
| download | wayland-cd0dccd01e16fa404e03974d30ded3aebdb1c4bc.tar wayland-cd0dccd01e16fa404e03974d30ded3aebdb1c4bc.tar.gz wayland-cd0dccd01e16fa404e03974d30ded3aebdb1c4bc.tar.bz2 wayland-cd0dccd01e16fa404e03974d30ded3aebdb1c4bc.tar.lz wayland-cd0dccd01e16fa404e03974d30ded3aebdb1c4bc.tar.xz wayland-cd0dccd01e16fa404e03974d30ded3aebdb1c4bc.tar.zst wayland-cd0dccd01e16fa404e03974d30ded3aebdb1c4bc.zip | |
scanner: set errno=0 before strtol
POSIX says to set errno=0 before calling strtol since
the return value alne cannot tell a failure.
on ubuntu armel I get:
../src/wayland-scanner client-header < ../../protocol/wayland.xml > wayland-client-protocol.h
<stdin>:1188: error: invalid integer (2)
Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/scanner.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/scanner.c b/src/scanner.c index a030181..243ddfd 100644 --- a/src/scanner.c +++ b/src/scanner.c @@ -399,6 +399,7 @@ start_element(void *data, const char *element_name, const char **atts) message->destructor = 0; if (since != NULL) { + errno = 0; version = strtol(since, &end, 0); if (errno == EINVAL || end == since || *end != '\0') fail(&ctx->loc, |
