Corrected the way of error checking: first check if(err == ((char*)-1)), otherwise, it causes a SIGSEGV in 'snprintf'
Corrected the way of error checking: first check if(err == ((char*)-1)),
otherwise, it causes a SIGSEGV in 'snprintf'

zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb