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

guillem pushed a commit to branch main
in repository dpkg.

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

commit eea6717cb234d6fff1d80770eee7df9be00ae4af
Author: Guillem Jover <[email protected]>
AuthorDate: Tue Feb 6 03:15:59 2024 +0100

    dpkg: Reduce variable scope in conffderef()
    
    Changelog: internal
---
 src/main/configure.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/main/configure.c b/src/main/configure.c
index 76998dc98..2b48ce7bb 100644
--- a/src/main/configure.c
+++ b/src/main/configure.c
@@ -699,7 +699,6 @@ conffderef(struct pkginfo *pkg, struct varbuf *result, 
const char *in)
 {
        static struct varbuf target = VARBUF_INIT;
        struct stat stab;
-       ssize_t r;
        int loopprotect;
 
        varbuf_set_str(result, dpkg_fsys_get_dir());
@@ -767,6 +766,8 @@ conffderef(struct pkginfo *pkg, struct varbuf *result, 
const char *in)
                                debug(dbg_conffdetail,
                                      "conffderef readlink absolute");
                        } else {
+                               ssize_t r;
+
                                for (r = result->used - 1; r > 0 && 
result->buf[r] != '/'; r--)
                                        ;
                                if (r < 0) {

-- 
Dpkg.Org's dpkg

Reply via email to