From 3d35bce271e5e5734e8bd67621ff8d3903ff4ad1 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Tue, 9 Jun 2020 10:24:38 +0200 Subject: [PATCH] alsa-info.sh: declare variables separately from the assign (coverity) Signed-off-by: Jaroslav Kysela --- alsa-info/alsa-info.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/alsa-info/alsa-info.sh b/alsa-info/alsa-info.sh index c184915..daffee8 100755 --- a/alsa-info/alsa-info.sh +++ b/alsa-info/alsa-info.sh @@ -239,8 +239,10 @@ withdmesg() { } withpackages() { - local RPM="$(which rpmquery 2>/dev/null | sed 's|^[^/]*||' 2>/dev/null)" - local DPKG="$(which dpkg 2>/dev/null | sed 's|^[^/]*||' 2>/dev/null)" + local RPM + local DPKG + RPM="$(which rpmquery 2>/dev/null | sed 's|^[^/]*||' 2>/dev/null)" + DPKG="$(which dpkg 2>/dev/null | sed 's|^[^/]*||' 2>/dev/null)" [ -n "$RPM$DPKG" ] || return local PATTERN='(alsa-(lib|oss|plugins|tools|(topology|ucm)-conf|utils)|libalsa|tinycompress)' {