aboutsummaryrefslogtreecommitdiffstats
path: root/util/szap/azap.c
diff options
context:
space:
mode:
authorMark Purcell <msp@debian.org>2008-06-22 11:00:40 +1000
committeretobi <git@e-tobi.net>2013-09-03 09:48:42 +0200
commit891c51ff368ed700dec6025eeb47ce4d96f76418 (patch)
tree3729664829e4faa691d403274f38eb10890b533c /util/szap/azap.c
parent1c6e1f28f54ec2606c23936c1d8689f2be55a86c (diff)
parentab959d7b4194715870128e616b8e29d4a101e488 (diff)
downloadlinux-dvb-apps-891c51ff368ed700dec6025eeb47ce4d96f76418.tar.gz
Imported Debian patch 1.1.1+rev1207-1debian/1.1.1+rev1207-1
Diffstat (limited to '')
-rw-r--r--util/szap/azap.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/util/szap/azap.c b/util/szap/azap.c
index 14a1c6a..5bd7f33 100644
--- a/util/szap/azap.c
+++ b/util/szap/azap.c
@@ -103,7 +103,10 @@ int parse_int(int fd, int *val)
return -3; /* to fit in 32 bit */
};
+ errno = 0;
*val = strtol(number, NULL, 10);
+ if (errno == ERANGE)
+ return -4;
return 0;
}
@@ -189,9 +192,9 @@ int parse(const char *fname, const char *channel,
if ((err = try_parse_param(fd,
modulation_list, LIST_SIZE(modulation_list),
- (int *) &frontend->u.vsb.modulation,
- "modulation")))
+ &tmp, "modulation")))
return -4;
+ frontend->u.vsb.modulation = tmp;
if ((err = try_parse_int(fd, vpid, "Video PID")))
return -5;
@@ -389,4 +392,3 @@ int main(int argc, char **argv)
return 0;
}
-