On Wed, Apr 20, 2011 at 3:40 PM, Alex Converse <[email protected]> wrote: > > Check that the value passed for an OPT_INT option is an int, fail > otherwise. > (cherry picked from commit 584c2f1db82fbb8024ba2b6b4c48397efedcc125) > --- > cmdutils.c | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > >
git send-email fail
From 7e1eca967dc812e74b2b34f6d69a734ecc1d0337 Mon Sep 17 00:00:00 2001 From: Stefano Sabatini <[email protected]> Date: Sat, 16 Apr 2011 13:41:53 +0200 Subject: [PATCH 6/6] cmdutils: add OPT_INT check in parse_number_or_die() MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1" This is a multi-part message in MIME format. --------------1 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit Check that the value passed for an OPT_INT option is an int, fail otherwise. (cherry picked from commit 584c2f1db82fbb8024ba2b6b4c48397efedcc125) --- cmdutils.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) --------------1 Content-Type: text/x-patch; name="0006-cmdutils-add-OPT_INT-check-in-parse_number_or_die.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0006-cmdutils-add-OPT_INT-check-in-parse_number_or_die.patch" diff --git a/cmdutils.c b/cmdutils.c index cd4c05b..25b32ca 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -102,6 +102,8 @@ double parse_number_or_die(const char *context, const char *numstr, int type, do error= "The value for %s was %s which is not within %f - %f\n"; else if(type == OPT_INT64 && (int64_t)d != d) error= "Expected int64 for %s but found %s\n"; + else if (type == OPT_INT && (int)d != d) + error= "Expected int for %s but found %s\n"; else return d; fprintf(stderr, error, context, numstr, min, max); --------------1--
_______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
