]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
ar: Correct operation check when instance_specifed is set.
authorMark Wielaard <mjw@redhat.com>
Fri, 18 Oct 2013 08:37:53 +0000 (10:37 +0200)
committerMark Wielaard <mjw@redhat.com>
Fri, 18 Oct 2013 08:38:00 +0000 (10:38 +0200)
Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Mark Wielaard <mjw@redhat.com>
src/ChangeLog
src/ar.c

index e538a577c7ef7dcf164666a9fd796a38cb932a08..72f99245306e265c9f3346e8c751f53ad8a027f1 100644 (file)
@@ -1,3 +1,7 @@
+2013-10-18  Mark Wielaard  <mjw@redhat.com>
+
+       * ar.c (main): Correct operation check when instance_specifed is set.
+
 2013-09-26  Petr Machata  <pmachata@redhat.com>
 
        * readelf.c (handle_file_note): New function.
index 2d6ad60c5b2b63770865f041b161f4060dbcb2b7..f51f0efdd7170fec4d11a24360a4d782a609ad3d 100644 (file)
--- 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"));