Bug #17235 perror prints wrong prefix for ndb error codes

parent 8d1e578c
...@@ -239,10 +239,24 @@ int main(int argc,char *argv[]) ...@@ -239,10 +239,24 @@ int main(int argc,char *argv[])
if ((ndb_error_string(code, ndb_string, sizeof(ndb_string)) < 0) && if ((ndb_error_string(code, ndb_string, sizeof(ndb_string)) < 0) &&
(ndbd_exit_string(code, ndb_string, sizeof(ndb_string)) < 0)) (ndbd_exit_string(code, ndb_string, sizeof(ndb_string)) < 0))
{ {
msg= 0; msg= 0;
} }
else else
msg= ndb_string; msg= ndb_string;
if (msg)
{
if (verbose)
printf("NDB error code %3d: %s\n",code,msg);
else
puts(msg);
}
else
{
fprintf(stderr,"Illegal ndb error code: %d\n",code);
error= 1;
}
found= 1;
msg= 0;
} }
else else
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment