summaryrefslogtreecommitdiff
path: root/libodbcpp/ustring.cpp
diff options
context:
space:
mode:
authorrandomdan <randomdan@localhost>2010-04-02 01:05:25 +0000
committerrandomdan <randomdan@localhost>2010-04-02 01:05:25 +0000
commit1ede41e012f7363a0d2804e70be0f6c772997e82 (patch)
tree86671e425d8f66fa16ce1989dbdc4fac45853295 /libodbcpp/ustring.cpp
parentLots of little fixes (diff)
downloadlibdbpp-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.cpp5
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;
}