Subject: [PATCH] tags.sh: Add missing quotes

When $remove_structs is empty a test for empty string will turn
into test -n with no arguments meaning true. Add quotes so an
empty string is tested and so that make cscope works again.

Reported-and-tested-by: Jike Song <albcamus@gmail.com>
Reported-by: Prarit Bhargava <prarit@redhat.com>
Acked-by: Yang Bai <hamo.by@gmail.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
This commit is contained in:
Stephen Boyd 2012-03-31 23:41:07 -07:00 committed by Michal Marek
parent dd775ae254
commit 0eb043d0ee

View File

@ -254,6 +254,6 @@ case "$1" in
esac
# Remove structure forward declarations.
if [ -n $remove_structs ]; then
if [ -n "$remove_structs" ]; then
LANG=C sed -i -e '/^\([a-zA-Z_][a-zA-Z0-9_]*\)\t.*\t\/\^struct \1;.*\$\/;"\tx$/d' $1
fi