From 44cf9c6d2d274eac37502e835155f7e985f1b8e6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 7 Aug 2024 15:30:08 +0200 Subject: Adding upstream version 1.22.7. Signed-off-by: Daniel Baumann --- src/divert/main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/divert') diff --git a/src/divert/main.c b/src/divert/main.c index 23a0cd0..0266abf 100644 --- a/src/divert/main.c +++ b/src/divert/main.c @@ -28,7 +28,7 @@ #include #include -#if HAVE_LOCALE_H +#ifdef HAVE_LOCALE_H #include #endif #include @@ -147,7 +147,6 @@ file_init(struct file *f, const char *filename) varbuf_add_str(&usefilename, dpkg_fsys_get_dir()); varbuf_add_str(&usefilename, filename); - varbuf_end_str(&usefilename); f->name = varbuf_detach(&usefilename); f->stat_state = FILE_STAT_INVALID; @@ -329,7 +328,7 @@ varbuf_diversion(struct varbuf *str, const char *pkgname, filename, divertto, pkgname); } - return str->buf; + return varbuf_str(str); } static const char * @@ -349,7 +348,7 @@ diversion_current(const char *filename) return varbuf_diversion(&str, opt_pkgname, filename, opt_divertto); } - return str.buf; + return varbuf_str(&str); } static const char * -- cgit v1.2.3