diff options
| author | Spp <none@none> | 2010-05-13 00:15:21 +0200 |
|---|---|---|
| committer | Spp <none@none> | 2010-05-13 00:15:21 +0200 |
| commit | a3a8e6da2c6380de7f04bdb0f3f6939e20d493c4 (patch) | |
| tree | ed9a57e9c72287b1544f39cfe1bff09492e2a2ce /src/shared | |
| parent | 4a448eca37a5a5409d39d4036db3793cfa27edf8 (diff) | |
Some warning fix
Tab to spaces
Remove trailing spaces
--HG--
branch : trunk
Diffstat (limited to 'src/shared')
| -rw-r--r-- | src/shared/Database/Field.cpp | 16 | ||||
| -rw-r--r-- | src/shared/Util.cpp | 2 |
2 files changed, 13 insertions, 5 deletions
diff --git a/src/shared/Database/Field.cpp b/src/shared/Database/Field.cpp index 8a02ec716e3..191a2884aac 100644 --- a/src/shared/Database/Field.cpp +++ b/src/shared/Database/Field.cpp @@ -31,8 +31,12 @@ Field::Field(Field &f) value = f.GetString(); - if (value && (mValue = new char[strlen(value) + 1])) - strcpy(mValue, value); + if (value) + { + mValue = new char[strlen(value) + 1]; + if (mValue) + strcpy(mValue, value); + } else mValue = NULL; @@ -42,8 +46,12 @@ Field::Field(Field &f) Field::Field(const char *value, enum Field::DataTypes type) : mType(type) { - if (value && (mValue = new char[strlen(value) + 1])) - strcpy(mValue, value); + if (value) + { + mValue = new char[strlen(value) + 1]; + if (mValue) + strcpy(mValue, value); + } else mValue = NULL; } diff --git a/src/shared/Util.cpp b/src/shared/Util.cpp index 3c5e365b749..a3c017fdbfd 100644 --- a/src/shared/Util.cpp +++ b/src/shared/Util.cpp @@ -425,7 +425,7 @@ void utf8printf(FILE *out, const char *str, ...) { va_list ap; va_start(ap, str); - vutf8printf(stdout, str, &ap); + vutf8printf(out, str, &ap); va_end(ap); } |
