myadm

Simple MySQL client for the terminal
git clone git://git.bitsmanent.org/myadm
Log | Files | Refs | README | LICENSE

commit 893891c2b3a76f16f6aa911622c182f7405087bd
parent a4bc0319ebdd2542507b98ae92e78a948de3899f
Author: Claudio Alessi <smoppy@gmail.com>
Date:   Mon, 29 Feb 2016 22:09:51 +0100

Make char * all DB* constants.

Diffstat:
Mcore.c | 9++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/core.c b/core.c @@ -85,10 +85,9 @@ void reload(const Arg *arg); /* config.h > */ -/* XXX command line arguments */ -#define DBHOST "localhost" -#define DBUSER "root" -#define DBPASS "m0r3s3cur3" +static const char *dbhost = "localhost"; +static const char *dbuser = "root"; +static const char *dbpass = "m0r3s3cur3"; static Mode modes[] = { /* name show function */ @@ -444,7 +443,7 @@ main(int argc, char **argv) { unsigned int i; mysql = mysql_init(NULL); - if(mysql_real_connect(mysql, DBHOST, DBUSER, DBPASS, NULL, 0, NULL, 0) == NULL) + if(mysql_real_connect(mysql, dbhost, dbuser, dbpass, NULL, 0, NULL, 0) == NULL) die("Cannot connect to the database.\n"); ipool = stfl_ipool_create(nl_langinfo(CODESET));