From 1155d29e29b570f8b89053eccc08bd19256eeb10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Abecasis?= Date: Wed, 30 Mar 2011 16:59:11 +0200 Subject: 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 --- src/corelib/io/qtemporaryfile.cpp | 2 -- 1 file changed, 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) -- cgit v0.12