diff options
author | CoprDistGit <infra@openeuler.org> | 2024-10-22 06:29:15 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2024-10-22 06:29:15 +0000 |
commit | e58e1d1c87014a545f9ad78f241c417c3b38dc52 (patch) | |
tree | 8caf6b6f9670f14f77fe27e15ebad005f6d76089 /Get-instance-correctly-for-eu-ar-N-option.patch | |
parent | d88cc1d435af211a1d31103aea4f9539f41b659b (diff) |
automatic import of elfutilsopeneuler20.03_LTS_SP4
Diffstat (limited to 'Get-instance-correctly-for-eu-ar-N-option.patch')
-rw-r--r-- | Get-instance-correctly-for-eu-ar-N-option.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/Get-instance-correctly-for-eu-ar-N-option.patch b/Get-instance-correctly-for-eu-ar-N-option.patch new file mode 100644 index 0000000..ad0828f --- /dev/null +++ b/Get-instance-correctly-for-eu-ar-N-option.patch @@ -0,0 +1,34 @@ +From 246d6d0ffcfe9ac6ef3581ca74399036aa827590 Mon Sep 17 00:00:00 2001 +From: panxiaohe <panxh.life@foxmail.com> +Date: Fri, 12 Aug 2022 17:05:40 +0800 +Subject: [PATCH] get instance correctly for eu-ar -N option + +--- + src/ar.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/ar.c b/src/ar.c +index 42126aa..f8166d3 100644 +--- a/src/ar.c ++++ b/src/ar.c +@@ -518,7 +518,7 @@ do_oper_extract (int oper, const char *arfname, char **argv, int argc, + ENTRY entry; + entry.key = arhdr->ar_name; + ENTRY *res = hsearch (entry, FIND); +- if (res != NULL && (instance < 0 || instance-- == 0) ++ if (res != NULL && (instance < 0 || --instance == 0) + && !found[(char **) res->data - argv]) + found[(char **) res->data - argv] = do_extract = true; + } +@@ -952,7 +952,7 @@ do_oper_delete (const char *arfname, char **argv, int argc, + ENTRY entry; + entry.key = arhdr->ar_name; + ENTRY *res = hsearch (entry, FIND); +- if (res != NULL && (instance < 0 || instance-- == 0) ++ if (res != NULL && (instance < 0 || --instance == 0) + && !found[(char **) res->data - argv]) + found[(char **) res->data - argv] = do_delete = true; + } +-- +2.27.0 + |