The following commit has been merged in the master branch:
commit 5fef90a2960053e9b24304e2a2663fb1ed7dafb1
Author: Guillem Jover <[email protected]>
Date:   Mon Feb 8 14:57:31 2010 +0100

    s-s-d: Do not shadow global variables

diff --git a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c
index 11a063b..26b60db 100644
--- a/utils/start-stop-daemon.c
+++ b/utils/start-stop-daemon.c
@@ -211,7 +211,7 @@ static bool pid_is_user(pid_t pid, uid_t uid);
 static bool pid_is_cmd(pid_t pid, const char *name);
 static void check(pid_t pid);
 static void do_pidfile(const char *name);
-static void do_stop(int signal_nr, int quietmode,
+static void do_stop(int sig_num, int quiet,
                     int *n_killed, int *n_notkilled, int retry_nr);
 #if defined(OSLinux) || defined(OShpux)
 static bool pid_is_exec(pid_t pid, const struct stat *esb);
@@ -470,16 +470,16 @@ parse_integer(const char *string, int *value_r)
 }
 
 static int
-parse_signal(const char *signal_str, int *signal_nr)
+parse_signal(const char *sig_str, int *sig_num)
 {
        unsigned int i;
 
-       if (parse_integer(signal_str, signal_nr) == 0)
+       if (parse_integer(sig_str, sig_num) == 0)
                return 0;
 
        for (i = 0; i < array_count(siglist); i++) {
-               if (strcmp(signal_str, siglist[i].name) == 0) {
-                       *signal_nr = siglist[i].signal;
+               if (strcmp(sig_str, siglist[i].name) == 0) {
+                       *sig_num = siglist[i].signal;
                        return 0;
                }
        }
@@ -1250,8 +1250,7 @@ do_findprocs(void)
 }
 
 static void
-do_stop(int signal_nr, int quietmode, int *n_killed, int *n_notkilled,
-        int retry_nr)
+do_stop(int sig_num, int quiet, int *n_killed, int *n_notkilled, int retry_nr)
 {
        struct pid_list *p;
 
@@ -1269,13 +1268,13 @@ do_stop(int signal_nr, int quietmode, int *n_killed, 
int *n_notkilled,
                if (testmode) {
                        if (quietmode <= 0)
                                printf("Would send signal %d to %d.\n",
-                                      signal_nr, p->pid);
+                                      sig_num, p->pid);
                        (*n_killed)++;
-               } else if (kill(p->pid, signal_nr) == 0) {
+               } else if (kill(p->pid, sig_num) == 0) {
                        push(&killed, p->pid);
                        (*n_killed)++;
                } else {
-                       if (signal_nr)
+                       if (sig_num)
                                warning("failed to kill %d: %s\n",
                                        p->pid, strerror(errno));
                        (*n_notkilled)++;

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to