Browse Source

s-s-d: Rename err to ret as the former is a function on BSDs

Do not shadow the global err() with a local variable.
Guillem Jover 7 years ago
parent
commit
6031615231
2 changed files with 5 additions and 3 deletions
  1. 2 0
      debian/changelog
  2. 3 3
      utils/start-stop-daemon.c

+ 2 - 0
debian/changelog

@@ -6,6 +6,8 @@ dpkg (1.18.23) UNRELEASED; urgency=medium
   * Portability:
     - Do not redeclare sys_siglist in libcompat when the system does so.
       Thanks to Thomas Klausner <wiz@NetBSD.org>.
+    - Rename err variable to ret in start-stop-daemon as the former is a
+      function on BSDs.
   * Perl modules:
     - Do not special case EM_SPARC32PLUS for NetBSD in Dpkg::Shlibs::Objdump,
       the code has been fixed in NetBSD as that situation could not happen.

+ 3 - 3
utils/start-stop-daemon.c

@@ -434,10 +434,10 @@ wait_for_child(pid_t pid)
 		fatal("error waiting for child");
 
 	if (WIFEXITED(status)) {
-		int err = WEXITSTATUS(status);
+		int ret = WEXITSTATUS(status);
 
-		if (err != 0)
-			fatal("child returned error exit status %d", err);
+		if (ret != 0)
+			fatal("child returned error exit status %d", ret);
 	} else if (WIFSIGNALED(status)) {
 		int signo = WTERMSIG(status);