diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:30:08 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:30:08 +0000 |
commit | 44cf9c6d2d274eac37502e835155f7e985f1b8e6 (patch) | |
tree | 9576ba968924c5b9a55ba9e14f4f26184c62c7d4 /src/divert/main.c | |
parent | Adding upstream version 1.22.6. (diff) | |
download | dpkg-44cf9c6d2d274eac37502e835155f7e985f1b8e6.tar.xz dpkg-44cf9c6d2d274eac37502e835155f7e985f1b8e6.zip |
Adding upstream version 1.22.7.upstream/1.22.7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/divert/main.c')
-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 * |