Fossil SCM

const-correctness tweak in db_text().

stephan 2011-10-05 03:32 UTC json-multitag-test
Commit 30431ff9035a78713f1171ce9329e824aa4ebfff
1 file changed +1 -1
+1 -1
--- src/db.c
+++ src/db.c
@@ -578,11 +578,11 @@
578578
** Execute a query. Return the first column of the first row
579579
** of the result set as a string. Space to hold the string is
580580
** obtained from malloc(). If the result set is empty, return
581581
** zDefault instead.
582582
*/
583
-char *db_text(char *zDefault, const char *zSql, ...){
583
+char *db_text(char const *zDefault, const char *zSql, ...){
584584
va_list ap;
585585
Stmt s;
586586
char *z;
587587
va_start(ap, zSql);
588588
db_vprepare(&s, 0, zSql, ap);
589589
--- src/db.c
+++ src/db.c
@@ -578,11 +578,11 @@
578 ** Execute a query. Return the first column of the first row
579 ** of the result set as a string. Space to hold the string is
580 ** obtained from malloc(). If the result set is empty, return
581 ** zDefault instead.
582 */
583 char *db_text(char *zDefault, const char *zSql, ...){
584 va_list ap;
585 Stmt s;
586 char *z;
587 va_start(ap, zSql);
588 db_vprepare(&s, 0, zSql, ap);
589
--- src/db.c
+++ src/db.c
@@ -578,11 +578,11 @@
578 ** Execute a query. Return the first column of the first row
579 ** of the result set as a string. Space to hold the string is
580 ** obtained from malloc(). If the result set is empty, return
581 ** zDefault instead.
582 */
583 char *db_text(char const *zDefault, const char *zSql, ...){
584 va_list ap;
585 Stmt s;
586 char *z;
587 va_start(ap, zSql);
588 db_vprepare(&s, 0, zSql, ap);
589

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button