aboutsummaryrefslogtreecommitdiff
path: root/src/malloc.c
diff options
context:
space:
mode:
authordan <dan@noemail.net>2015-06-02 18:07:58 +0000
committerdan <dan@noemail.net>2015-06-02 18:07:58 +0000
commit167fd757f0799d5c6519d66cd9f26e6ffcb2f1bd (patch)
tree4482f33a4ccf87878095e1bddd515f85f7d57137 /src/malloc.c
parentdbef6e752e9c1d26f9f1a0a62fee3e523b490bf0 (diff)
parent467c1c70fb519279fe5f806425923417673eb2f1 (diff)
downloadsqlite-167fd757f0799d5c6519d66cd9f26e6ffcb2f1bd.tar.gz
sqlite-167fd757f0799d5c6519d66cd9f26e6ffcb2f1bd.zip
Merge latest trunk changes with this branch.
FossilOrigin-Name: c9ffda4abb4390bbc5719e269196e2807b254f97
Diffstat (limited to 'src/malloc.c')
-rw-r--r--src/malloc.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/malloc.c b/src/malloc.c
index 70b834579..1b9a20956 100644
--- a/src/malloc.c
+++ b/src/malloc.c
@@ -771,19 +771,11 @@ char *sqlite3DbStrNDup(sqlite3 *db, const char *z, u64 n){
}
/*
-** Create a string from the zFromat argument and the va_list that follows.
-** Store the string in memory obtained from sqliteMalloc() and make *pz
-** point to that string.
+** Free any prior content in *pz and replace it with a copy of zNew.
*/
-void sqlite3SetString(char **pz, sqlite3 *db, const char *zFormat, ...){
- va_list ap;
- char *z;
-
- va_start(ap, zFormat);
- z = sqlite3VMPrintf(db, zFormat, ap);
- va_end(ap);
+void sqlite3SetString(char **pz, sqlite3 *db, const char *zNew){
sqlite3DbFree(db, *pz);
- *pz = z;
+ *pz = sqlite3DbStrDup(db, zNew);
}
/*