[PATCH 08/15] email-test-patchset: remove a useless variable

Artem Bityutskiy dedekind1 at gmail.com
Wed Feb 5 07:10:37 PST 2014


From: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>

This is another cosmetic clean-up. Just trying to make this script a bit
smaller and more readable. Remove the 'msgname' variable since we only use it
once.

Also, substitute 'echo' with 'printf', since we are trying to not using echo as
a general policy, see this URL for more infor why echo may be dangeros and
printf is safe:

http://unix.stackexchange.com/questions/65803/why-is-printf-better-than-echo

Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
---
 email/aiaiai-email-test-patchset | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/email/aiaiai-email-test-patchset b/email/aiaiai-email-test-patchset
index 3abc960..040e5d7 100755
--- a/email/aiaiai-email-test-patchset
+++ b/email/aiaiai-email-test-patchset
@@ -278,10 +278,9 @@ fi
 fetch_header_or_die subj "Subject" < "$mbox"
 fetch_header_or_die from "From" < "$mbox"
 fetch_header_or_die id "Message-Id" < "$mbox"
-msgname="$from: $subj (Message-Id: $id)"
 
-echo >&2
-verbose "Testing mbox: \"$msgname\""
+printf "\n"
+verbose "Testing mbox: \"$from: $subj (Message-Id: $id)\""
 verbose "parsing config file \"$cfgfile\""
 
 parse_config "$cfgfile"
-- 
1.8.5.2




More information about the aiaiai mailing list