From: Florian Krohm Date: Tue, 2 Sep 2014 11:58:10 +0000 (+0000) Subject: Remove some unneeded checks. These were spotted by the Coverity checker. X-Git-Tag: svn/VALGRIND_3_10_0~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8a8cc67ca0a253e5e7e383c805e8c5fafedb5d11;p=thirdparty%2Fvalgrind.git Remove some unneeded checks. These were spotted by the Coverity checker. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14430 --- diff --git a/auxprogs/valgrind-di-server.c b/auxprogs/valgrind-di-server.c index 40b59d77ad..85c13702f7 100644 --- a/auxprogs/valgrind-di-server.c +++ b/auxprogs/valgrind-di-server.c @@ -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? diff --git a/coregrind/m_debuginfo/image.c b/coregrind/m_debuginfo/image.c index 2be6fd306d..02a367d4d4 100644 --- a/coregrind/m_debuginfo/image.c +++ b/coregrind/m_debuginfo/image.c @@ -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: