This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH v2a 1/2][BZ #13853] Change parameter expansions to conversionspecs


2012-11-25  P. J. McDermott  <pjm@nac.net>

	* debug/xtrace.sh: Replace parameter expansions in translatable strings
	with printf conversion specifications.
	* elf/ldd.bash.in: Likewise.
	* malloc/memusage.sh: Likewise.
---
 debug/xtrace.sh    |    6 +++---
 elf/ldd.bash.in    |    2 +-
 malloc/memusage.sh |    4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/debug/xtrace.sh b/debug/xtrace.sh
index ec1cd09..e71c815 100755
--- a/debug/xtrace.sh
+++ b/debug/xtrace.sh
@@ -122,7 +122,7 @@ while test $# -gt 0; do
     break
     ;;
   --*)
-    printf >&2 $"xtrace: unrecognized option \`$1'\n"
+    printf >&2 $"xtrace: unrecognized option \`%s'\n" "$1"
     help_info
     ;;
   *)
@@ -143,11 +143,11 @@ fi
 program=$1
 shift
 if test ! -f "$program"; then
-  printf >&2 $"executable \`$program' not found\n"
+  printf >&2 $"executable \`%s' not found\n" "$program"
   help_info
 fi
 if test ! -x "$program"; then
-  printf >&2 $"\`$program' is no executable\n"
+  printf >&2 $"\`%s' is no executable\n" "$program"
   help_info
 fi
 
diff --git a/elf/ldd.bash.in b/elf/ldd.bash.in
index ff4714d..b36c6c1 100644
--- a/elf/ldd.bash.in
+++ b/elf/ldd.bash.in
@@ -77,7 +77,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
     shift
     ;;
   --v | --ve | --ver)
-    echo >&2 $"ldd: option \`$1' is ambiguous"
+    printf >&2 $"ldd: option \`%s' is ambiguous\n" "$1"
     exit 1
     ;;
   --)		# Stop option processing.
diff --git a/malloc/memusage.sh b/malloc/memusage.sh
index 50b92d5..0dee9d0 100755
--- a/malloc/memusage.sh
+++ b/malloc/memusage.sh
@@ -188,7 +188,7 @@ while test $# -gt 0; do
     memusagestat_args="$memusagestat_args -y ${1##*=}"
     ;;
   --p | --p=* | --t | --t=* | --ti | --ti=* | --u)
-    echo >&2 $"memusage: option \`${1##*=}' is ambiguous"
+    printf >&2 $"memusage: option \`%s' is ambiguous\n" "${1##*=}"
     do_usage
     ;;
   --)
@@ -197,7 +197,7 @@ while test $# -gt 0; do
     break
     ;;
   --*)
-    echo >&2 $"memusage: unrecognized option \`$1'"
+    printf >&2 $"memusage: unrecognized option \`%s'\n" "$1"
     do_usage
     ;;
   *)
-- 
1.7.10.4


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]