From: Mark Wielaard Date: Fri, 18 Oct 2013 08:37:53 +0000 (+0200) Subject: ar: Correct operation check when instance_specifed is set. X-Git-Tag: elfutils-0.158~88 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4f7673f97b5d09db2bc216cc3c46b96e999c15f2;p=thirdparty%2Felfutils.git ar: Correct operation check when instance_specifed is set. Reported-by: David Binderman Signed-off-by: Mark Wielaard --- diff --git a/src/ChangeLog b/src/ChangeLog index e538a577c..72f992453 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2013-10-18 Mark Wielaard + + * ar.c (main): Correct operation check when instance_specifed is set. + 2013-09-26 Petr Machata * readelf.c (handle_file_note): New function. diff --git a/src/ar.c b/src/ar.c index 2d6ad60c5..f51f0efdd 100644 --- a/src/ar.c +++ b/src/ar.c @@ -202,7 +202,7 @@ MEMBER parameter required for 'a', 'b', and 'i' modifiers")); if (instance_specifed) { /* Only valid for certain operations. */ - if (operation == oper_extract && operation == oper_delete) + if (operation != oper_extract && operation != oper_delete) error (1, 0, gettext ("\ 'N' is only meaningful with the 'x' and 'd' options"));