From daeadd98ba8143f900f26848dc9f0f14aea349b3 Mon Sep 17 00:00:00 2001 From: Didier Raboud Date: Sun, 22 Apr 2012 13:54:31 +0200 Subject: [PATCH] Make sure OPTIND is marked local for each use. Closes: #669909 Reported-by: Cristian Ionescu-Idbohrn Signed-off-by: Didier Raboud --- init-functions | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/init-functions b/init-functions index e4e7ab7..18fd2bd 100644 --- a/init-functions +++ b/init-functions @@ -28,7 +28,7 @@ #EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. start_daemon () { - local force nice pidfile exec args + local force nice pidfile exec args OPTIND force="" nice=0 pidfile=/dev/null @@ -62,7 +62,7 @@ start_daemon () { } pidofproc () { - local pidfile base status specified pid + local pidfile base status specified pid OPTIND pidfile= specified= @@ -120,7 +120,7 @@ pidofproc () { # start-stop-daemon uses the same algorithm as "pidofproc" above. killproc () { - local pidfile sig status base name_param is_term_sig + local pidfile sig status base name_param is_term_sig OPTIND pidfile= name_param= is_term_sig= @@ -174,7 +174,7 @@ killproc () { # Return LSB status status_of_proc () { - local pidfile daemon name status + local pidfile daemon name status OPTIND pidfile= OPTIND=1 -- 2.30.2