summaryrefslogtreecommitdiffstats
path: root/src/corelib/io
diff options
context:
space:
mode:
authorJoão Abecasis <joao.abecasis@nokia.com>2011-03-30 14:59:11 (GMT)
committerJoão Abecasis <joao.abecasis@nokia.com>2011-04-04 11:22:54 (GMT)
commit1155d29e29b570f8b89053eccc08bd19256eeb10 (patch)
tree2c0b6fd6e3806360b7688c1d2cf5437356bf1486 /src/corelib/io
parent9f806138930391b2dcb1d604ae39345a0bc7171a (diff)
downloadQt-1155d29e29b570f8b89053eccc08bd19256eeb10.zip
Qt-1155d29e29b570f8b89053eccc08bd19256eeb10.tar.gz
Qt-1155d29e29b570f8b89053eccc08bd19256eeb10.tar.bz2
Check for null no longer needed
With proper checks for boundary conditions, we no longer need to protect against reaching the terminating null character. Reviewed-by: Robin Burchell
Diffstat (limited to 'src/corelib/io')
-rw-r--r--src/corelib/io/qtemporaryfile.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/corelib/io/qtemporaryfile.cpp b/src/corelib/io/qtemporaryfile.cpp
index 4ff0ee3..1d9466d 100644
--- a/src/corelib/io/qtemporaryfile.cpp
+++ b/src/corelib/io/qtemporaryfile.cpp
@@ -178,8 +178,6 @@ static int createFileFromTemplate(char *const path,
for (char *iter = placeholderStart;;) {
// Character progression: [0-9] => 'a' ... 'z' => 'A' .. 'Z'
// String progression: "ZZaiC" => "aabiC"
- if (!*iter)
- return -1;
if (*iter == 'Z') {
*iter++ = 'a';
if (iter == placeholderEnd)