From 26b5944b40ddfdfd7109004c662650af3e354820 Mon Sep 17 00:00:00 2001 From: Hui Li Date: Thu, 4 Jun 2020 18:38:17 +0800 Subject: [PATCH] [modify] --- tests/examples/c/prepare.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/examples/c/prepare.c b/tests/examples/c/prepare.c index 0587d6b6ed..b063d502fc 100644 --- a/tests/examples/c/prepare.c +++ b/tests/examples/c/prepare.c @@ -19,15 +19,15 @@ int main(int argc, char *argv[]) TAOS_STMT *stmt; // connect to server - //if (argc < 2) { - // printf("please input server ip \n"); - // return 0; - //} + if (argc < 2) { + printf("please input server ip \n"); + return 0; + } // init TAOS taos_init(); - taos = taos_connect("127.0.0.1", "root", "taosdata", NULL, 0); + taos = taos_connect(argv[1], "root", "taosdata", NULL, 0); if (taos == NULL) { printf("failed to connect to db, reason:%s\n", taos_errstr(taos)); exit(1); -- GitLab