The following commit has been merged in the master branch:
commit c61f48738fee364f2f1d32aaae5c073e30eecc52
Author: Guillem Jover <[email protected]>
Date: Mon Sep 28 20:11:10 2009 +0200
dpkg: Reduce variable scope in checkpath
Move them closer to their actual usage.
diff --git a/src/help.c b/src/help.c
index 67cb844..62221ce 100644
--- a/src/help.c
+++ b/src/help.c
@@ -94,12 +94,10 @@ void checkpath(void) {
NULL
};
- struct stat stab;
const char *const *prog;
- const char *path_list, *path, *path_end;
+ const char *path_list;
char *filename;
int warned= 0;
- size_t path_len;
path_list = getenv("PATH");
if (!path_list)
@@ -107,6 +105,10 @@ void checkpath(void) {
filename = m_malloc(strlen(path_list) + 2 + strlen("start-stop-daemon"));
for (prog = prog_list; *prog; prog++) {
+ struct stat stab;
+ const char *path, *path_end;
+ size_t path_len;
+
path = path_list;
while (path) {
path_end = strchr(path, ':');
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]