From: Didier Raboud Date: Sun, 22 Apr 2012 11:54:31 +0000 (+0200) Subject: Make sure OPTIND is marked local for each use. X-Git-Tag: archive/raspbian/10.2018112800+rpi1^2~148 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=daeadd98ba8143f900f26848dc9f0f14aea349b3;p=lsb.git Make sure OPTIND is marked local for each use. Closes: #669909 Reported-by: Cristian Ionescu-Idbohrn Signed-off-by: Didier Raboud --- 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