]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
use a local var: more readable
authorJim Meyering <meyering@redhat.com>
Sun, 14 Jun 2009 12:43:16 +0000 (14:43 +0200)
committerJim Meyering <meyering@redhat.com>
Mon, 15 Jun 2009 16:34:21 +0000 (18:34 +0200)
tests/test-lib.sh

index d99e3a96627a97821d51763f9b94b517452f765d..60e92d3c62499db50415782ec4683651896410f1 100644 (file)
@@ -124,7 +124,8 @@ uid_is_privileged_()
 
 get_process_status_()
 {
-  sed -n '/^State:[     ]*\([[:alpha:]]\).*/s//\1/p' /proc/$1/status
+  local pid=$1
+  sed -n '/^State:[     ]*\([[:alpha:]]\).*/s//\1/p' /proc/$pid/status
 }
 
 # Convert an ls-style permission string, like drwxr----x and -rw-r-x-wx