diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:30:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:30:09 +0000 |
commit | 3c05da1bdef2a6e2142b4fcac974e7e3fc0db93c (patch) | |
tree | 9532e637f47d6ff7246ccbabb62d4e2b4b5908df /src/divert | |
parent | Adding debian version 1.22.6. (diff) | |
download | dpkg-3c05da1bdef2a6e2142b4fcac974e7e3fc0db93c.tar.xz dpkg-3c05da1bdef2a6e2142b4fcac974e7e3fc0db93c.zip |
Merging upstream version 1.22.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | src/divert/main.c | 7 |
1 files changed, 3 insertions, 4 deletions
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 <sys/stat.h> #include <errno.h> -#if HAVE_LOCALE_H +#ifdef HAVE_LOCALE_H #include <locale.h> #endif #include <fcntl.h> @@ -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 * |