This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch master
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=f47ab454d1eb51cb2302172899847064541158da

commit f47ab454d1eb51cb2302172899847064541158da
Author: Guillem Jover <[email protected]>
AuthorDate: Fri Oct 12 13:26:32 2018 +0200

    s-s-d: Move parse_unsigned() definition to the top of the file
    
    This way we can use in earlier functions.
---
 utils/start-stop-daemon.c | 40 ++++++++++++++++++++--------------------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c
index 63fee7e4d..63fb36a7d 100644
--- a/utils/start-stop-daemon.c
+++ b/utils/start-stop-daemon.c
@@ -436,6 +436,26 @@ newpath(const char *dirname, const char *filename)
        return path;
 }
 
+static int
+parse_unsigned(const char *string, int base, int *value_r)
+{
+       long value;
+       char *endptr;
+
+       if (!string[0])
+               return -1;
+
+       errno = 0;
+       value = strtol(string, &endptr, base);
+       if (string == endptr || *endptr != '\0' || errno != 0)
+               return -1;
+       if (value < 0 || value > INT_MAX)
+               return -1;
+
+       *value_r = value;
+       return 0;
+}
+
 static long
 get_open_fd_max(void)
 {
@@ -745,26 +765,6 @@ static const struct sigpair siglist[] = {
 };
 
 static int
-parse_unsigned(const char *string, int base, int *value_r)
-{
-       long value;
-       char *endptr;
-
-       if (!string[0])
-               return -1;
-
-       errno = 0;
-       value = strtol(string, &endptr, base);
-       if (string == endptr || *endptr != '\0' || errno != 0)
-               return -1;
-       if (value < 0 || value > INT_MAX)
-               return -1;
-
-       *value_r = value;
-       return 0;
-}
-
-static int
 parse_pid(const char *pid_str, int *pid_num)
 {
        if (parse_unsigned(pid_str, 10, pid_num) != 0)

-- 
Dpkg.Org's dpkg

Reply via email to