|
From: <sv...@va...> - 2014-09-02 11:58:22
|
Author: florian
Date: Tue Sep 2 11:58:10 2014
New Revision: 14430
Log:
Remove some unneeded checks. These were spotted by the Coverity checker.
Modified:
trunk/auxprogs/valgrind-di-server.c
trunk/coregrind/m_debuginfo/image.c
Modified: trunk/auxprogs/valgrind-di-server.c
==============================================================================
--- trunk/auxprogs/valgrind-di-server.c (original)
+++ trunk/auxprogs/valgrind-di-server.c Tue Sep 2 11:58:10 2014
@@ -884,8 +884,8 @@
//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?
Modified: trunk/coregrind/m_debuginfo/image.c
==============================================================================
--- trunk/coregrind/m_debuginfo/image.c (original)
+++ trunk/coregrind/m_debuginfo/image.c Tue Sep 2 11:58:10 2014
@@ -718,7 +718,7 @@
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 @@
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:
|