Message ID | 1306088259-96657-1-git-send-email-martin@martin.st |
---|---|
State | Rejected |
Headers | show |
On 05/22/2011 02:17 PM, Martin Storsjö wrote: > --- > libavutil/opt.c | 3 ++- > 1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/libavutil/opt.c b/libavutil/opt.c > index 57e3248..ada21e8 100644 > --- a/libavutil/opt.c > +++ b/libavutil/opt.c > @@ -280,7 +280,8 @@ static int av_get_number(void *obj, const char *name, const AVOption **o_out, do > return 0; > } > error: > - *den=*intnum=0; > + *intnum = 0; > + *den = 1; > return -1; > } why are they even modified in this case? shouldn't returning -1 be enough? it seems that the functions using this aren't even checking the return value... fixing that seems like a more appropriate solution. -Justin
diff --git a/libavutil/opt.c b/libavutil/opt.c index 57e3248..ada21e8 100644 --- a/libavutil/opt.c +++ b/libavutil/opt.c @@ -280,7 +280,8 @@ static int av_get_number(void *obj, const char *name, const AVOption **o_out, do return 0; } error: - *den=*intnum=0; + *intnum = 0; + *den = 1; return -1; }