提交 ea497f20 编写于 作者: H hjxilinx

[td-98] fix uninitialized value access warning by valgrind.

上级 39a0443e
......@@ -284,7 +284,7 @@ void shellRunCommandOnServer(TAOS *con, char command[]) {
/* Function to do regular expression check */
int regex_match(const char *s, const char *reg, int cflags) {
regex_t regex;
char msgbuf[100];
char msgbuf[100] = {0};
/* Compile regular expression */
if (regcomp(&regex, reg, cflags) != 0) {
......
......@@ -97,6 +97,8 @@ int main(int argc, char* argv[]) {
/* Interupt handler. */
struct sigaction act;
memset(&act, 0, sizeof(struct sigaction));
act.sa_handler = interruptHandler;
sigaction(SIGTERM, &act, NULL);
sigaction(SIGINT, &act, NULL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册