diff options
author | randomdan <randomdan@localhost> | 2010-04-02 01:05:25 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2010-04-02 01:05:25 +0000 |
commit | 1ede41e012f7363a0d2804e70be0f6c772997e82 (patch) | |
tree | 86671e425d8f66fa16ce1989dbdc4fac45853295 /libodbcpp/ustring.cpp | |
parent | Lots of little fixes (diff) | |
download | libdbpp-odbc-1ede41e012f7363a0d2804e70be0f6c772997e82.tar.bz2 libdbpp-odbc-1ede41e012f7363a0d2804e70be0f6c772997e82.tar.xz libdbpp-odbc-1ede41e012f7363a0d2804e70be0f6c772997e82.zip |
lots of gcc warning fixes and a few newbies
Diffstat (limited to 'libodbcpp/ustring.cpp')
-rw-r--r-- | libodbcpp/ustring.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libodbcpp/ustring.cpp b/libodbcpp/ustring.cpp index 07a1f44..dd8ee3b 100644 --- a/libodbcpp/ustring.cpp +++ b/libodbcpp/ustring.cpp @@ -1,4 +1,5 @@ #include <stdarg.h> +#include <stdio.h> #include "ustring.h" ODBC::String::String() @@ -32,7 +33,9 @@ ODBC::String::Format(const char * fmt, ...) char * buf; va_list va; va_start(va, fmt); - vasprintf(&buf, fmt, va); + if (vasprintf(&buf, fmt, va)) { + buf = NULL; + } va_end(va); return buf; } |