summaryrefslogtreecommitdiff
path: root/storage/connect/jsonudf.cpp
diff options
context:
space:
mode:
authorDavid CARLIER <devnexen@gmail.com>2021-03-10 16:02:55 +0000
committerAnel <an3l@users.noreply.github.com>2021-03-11 09:36:23 +0100
commita6cd4612a9e802a365f8fc37e0da6a24e2541133 (patch)
treebc0e0ee5d543932cec5f512d3f0de5f88bcefdca /storage/connect/jsonudf.cpp
parentf11b60879beba19798a76e17af206a95fd8fd204 (diff)
downloadmariadb-git-a6cd4612a9e802a365f8fc37e0da6a24e2541133.tar.gz
connect storage, little compile issues fix proposal.
Diffstat (limited to 'storage/connect/jsonudf.cpp')
-rw-r--r--storage/connect/jsonudf.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/storage/connect/jsonudf.cpp b/storage/connect/jsonudf.cpp
index 96e1db8f6c3..79e1534c51c 100644
--- a/storage/connect/jsonudf.cpp
+++ b/storage/connect/jsonudf.cpp
@@ -5865,7 +5865,7 @@ char *jfile_convert(UDF_INIT* initid, UDF_ARGS* args, char* result,
str = (char*)g->Xchk;
if (!str) {
- PUSH_WARNING(g->Message ? g->Message : "Unexpected error");
+ PUSH_WARNING(g->Message[0] != '\0' ? g->Message : "Unexpected error");
*is_null = 1;
*error = 1;
*res_length = 0;
@@ -5926,7 +5926,7 @@ char *jfile_bjson(UDF_INIT *initid, UDF_ARGS *args, char *result,
if (!g->Xchk) {
int msgid = MSGID_OPEN_MODE_STRERROR;
- FILE *fout;
+ FILE *fout = NULL;
FILE *fin;
if (!(fin = global_fopen(g, msgid, fn, "rt")))
@@ -5993,7 +5993,7 @@ char *jfile_bjson(UDF_INIT *initid, UDF_ARGS *args, char *result,
str = (char*)g->Xchk;
if (!str) {
- if (g->Message)
+ if (g->Message[0] != '\0')
str = strcpy(result, g->Message);
else
str = strcpy(result, "Unexpected error");