[Coverity] [GTK] Remove some redundant null checks in DumpRenderTree
authormrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Dec 2012 13:53:14 +0000 (13:53 +0000)
committermrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Dec 2012 13:53:14 +0000 (13:53 +0000)
https://bugs.webkit.org/show_bug.cgi?id=104570

Reviewed by Daniel Bates.

Source/WebKit/gtk:

* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
(DumpRenderTreeSupportGtk::elementDoesAutoCompleteForElementWithId): Remove a redundant null check.

Tools:

* DumpRenderTree/gtk/DumpRenderTree.cpp:
(descriptionSuitableForTestResult): Remove a redundant null check.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@137300 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
Tools/ChangeLog
Tools/DumpRenderTree/gtk/DumpRenderTree.cpp

index c3f49a3..9db526d 100644 (file)
@@ -1,3 +1,13 @@
+2012-12-11  Martin Robinson  <mrobinson@igalia.com>
+
+        [Coverity] [GTK] Remove some redundant null checks in DumpRenderTree
+        https://bugs.webkit.org/show_bug.cgi?id=104570
+
+        Reviewed by Daniel Bates.
+
+        * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+        (DumpRenderTreeSupportGtk::elementDoesAutoCompleteForElementWithId): Remove a redundant null check.
+
 2012-12-10  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [GTK] Build GObject DOM bindings as a separate library
index aa8ef60..13a13ae 100644 (file)
@@ -738,9 +738,6 @@ bool DumpRenderTreeSupportGtk::elementDoesAutoCompleteForElementWithId(WebKitWeb
         return false;
 
     HTMLInputElement* inputElement = static_cast<HTMLInputElement*>(coreNode);
-    if (!inputElement)
-        return false;
-
     return inputElement->isTextField() && !inputElement->isPasswordField() && inputElement->shouldAutocomplete();
 }
 
index e6df264..871552a 100644 (file)
@@ -1,3 +1,13 @@
+2012-12-11  Martin Robinson  <mrobinson@igalia.com>
+
+        [Coverity] [GTK] Remove some redundant null checks in DumpRenderTree
+        https://bugs.webkit.org/show_bug.cgi?id=104570
+
+        Reviewed by Daniel Bates.
+
+        * DumpRenderTree/gtk/DumpRenderTree.cpp:
+        (descriptionSuitableForTestResult): Remove a redundant null check.
+
 2012-12-11  Alberto Garcia  <agarcia@igalia.com>
 
         Remove unused GErrors
index 9c15d96..37f67ea 100644 (file)
@@ -1231,8 +1231,7 @@ static CString descriptionSuitableForTestResult(WebKitNetworkRequest* request)
     CString mainDocumentURIString(descriptionSuitableForTestResult(mainDocumentURI));
     CString path(convertNetworkRequestToURLPath(request));
     GOwnPtr<char> description(g_strdup_printf("<NSURLRequest URL %s, main document URL %s, http method %s>",
-                                              path.data(), mainDocumentURIString.data(),
-                                              soupMessage ? soupMessage->method : "(none)"));
+        path.data(), mainDocumentURIString.data(), soupMessage->method));
     return CString(description.get());
 }