The following commit has been merged in the master branch:
commit 77cae397a15baeca11c26aeb806b6be516e33d5f
Author: Guillem Jover <[email protected]>
Date: Mon Feb 8 03:05:28 2010 +0100
libdpkg: Use varbuf_detach instead of ad-hoc code
diff --git a/lib/dpkg/dbmodify.c b/lib/dpkg/dbmodify.c
index f2a572e..13af195 100644
--- a/lib/dpkg/dbmodify.c
+++ b/lib/dpkg/dbmodify.c
@@ -337,6 +337,6 @@ const char *pkgadminfile(struct pkginfo *pkg, const char
*whichfile) {
varbufaddc(&vb,'.');
varbufaddstr(&vb,whichfile);
varbufaddc(&vb,0);
- return vb.buf;
+ return varbuf_detach(&vb);
}
diff --git a/lib/dpkg/fields.c b/lib/dpkg/fields.c
index c523785..dfb9365 100644
--- a/lib/dpkg/fields.c
+++ b/lib/dpkg/fields.c
@@ -485,7 +485,7 @@ scan_word(const char **valp)
*valp = p;
- return word.buf;
+ return varbuf_detach(&word);
}
void
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]