diff options
author | João Abecasis <joao.abecasis@nokia.com> | 2010-08-18 19:38:55 +0200 |
---|---|---|
committer | João Abecasis <joao.abecasis@nokia.com> | 2010-08-19 12:58:35 +0200 |
commit | c6cc767cb065ca77aba06fe15830c22f187e370c (patch) | |
tree | e7f17f5fccbd06489c3c29b9dbd0605f850082f7 /src/corelib/io/qfsfileengine_unix.cpp | |
parent | 156d1590b405d1d374b5b8c87f5388718462c5e1 (diff) |
Prefer Q_CHECK_PTR to q_check_ptr
With the macro version we get proper debug output (with __FILE__,
__LINE__ annotations) when compiling with -no-exceptions and
!QT_NO_DEBUG.
All changes in this patch affect assignment to local variables, where
the order of assignment versus actual pointer check is not important.
Reviewed-by: Olivier Goffart
Diffstat (limited to 'src/corelib/io/qfsfileengine_unix.cpp')
-rw-r--r-- | src/corelib/io/qfsfileengine_unix.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp index 4764a46600..774932a28b 100644 --- a/src/corelib/io/qfsfileengine_unix.cpp +++ b/src/corelib/io/qfsfileengine_unix.cpp @@ -1092,7 +1092,8 @@ QString QFSFileEngine::fileName(FileName file) const int size = PATH_CHUNK_SIZE; while (1) { - s = q_check_ptr((char *) ::realloc(s, size)); + s = (char *) ::realloc(s, size); + Q_CHECK_PTR(s); len = ::readlink(d->nativeFilePath.constData(), s, size); if (len < 0) { ::free(s); |