diff options
author | Pavlina Moravcova Varekova <pmoravco@redhat.com> | 2019-07-29 08:37:13 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2019-08-28 12:16:52 +0300 |
commit | 6577f5bfc538118dd0ea16852631f2c705182703 (patch) | |
tree | 8a95a4fb3ee9ca1a1cf342be64f222d25c4df5b9 | |
parent | 21836bc7524f8fc07972e0e56eed1c3b68775368 (diff) | |
download | rpm-6577f5bfc538118dd0ea16852631f2c705182703.tar.gz |
Prefer '[] && []' to '[ -a ]' in test in find-debuginfo.sh (RhBug:1720590)
Spotted by covscan:
warning: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. [SC2166]
Originally introduced in commit 9aae21d.
Thanks to Florian Festi for spotting this and proposing the solution.
(cherry picked from commit 7b76b2c0624492cd06d5d1d61f438beb1e4ef3be)
-rwxr-xr-x | scripts/find-debuginfo.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh index 2e9d76531..295226023 100755 --- a/scripts/find-debuginfo.sh +++ b/scripts/find-debuginfo.sh @@ -213,7 +213,7 @@ if test -n "$build_id_seed" -a "$no_recompute_build_id" = "true"; then exit 2 fi -if [ "$strip_g" = "true" -a "$strip_glibs" = "true" ]; then +if [ "$strip_g" = "true" ] && [ "$strip_glibs" = "true" ]; then echo >&2 "*** ERROR: -g and --g-libs cannot be used together" exit 2 fi |