]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Remove some unneeded checks. These were spotted by the Coverity checker.
authorFlorian Krohm <florian@eich-krohm.de>
Tue, 2 Sep 2014 11:58:10 +0000 (11:58 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Tue, 2 Sep 2014 11:58:10 +0000 (11:58 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14430

auxprogs/valgrind-di-server.c
coregrind/m_debuginfo/image.c

index 40b59d77ad0443782f522235d95de88c729cead7..85c13702f73f61ceec69b6a86f19a745efa5d976 100644 (file)
@@ -884,8 +884,8 @@ static Bool handle_transaction ( int conn_no )
 //printf("SERVER: send %c%c%c%c\n", res->data[0], res->data[1], res->data[2], res->data[3]); fflush(stdout);
 
    /* So, success. */
-   if (req) free_Frame(req);
-   if (res) free_Frame(res);
+   free_Frame(req);
+   free_Frame(res);
    return False;  /* "connection still in use" */
 
    // Is there any difference between these?
index 2be6fd306d5e6fa90ab319140f108c8a01b3e0bc..02a367d4d496557e6ee8569f9d4d2cfbbeac9c4a 100644 (file)
@@ -718,7 +718,7 @@ DiImage* ML_(img_from_di_server)(const HChar* filename,
    return img;
 
   fail:
-   if (req) free_Frame(req);
+   free_Frame(req);
    if (res) {
       UChar* reason = NULL;
       if (parse_Frame_asciiz(res, "FAIL", &reason)) {
@@ -1006,8 +1006,8 @@ UInt ML_(img_calc_gnu_debuglink_crc32)(DiImage* img)
       ULong crc32 = 0;
       if (!parse_Frame_le64(res, "CROK", &crc32)) goto remote_crc_fail;
       if ((crc32 & ~0xFFFFFFFFULL) != 0) goto remote_crc_fail;
-      if (req) free_Frame(req);
-      if (res) free_Frame(res);
+      free_Frame(req);
+      free_Frame(res);
       return (UInt)crc32;
      remote_crc_fail: