[patch: libc/rpc/svc_vc.c] clang analyser: Branch condition evaluates to a garbage value

From: Boris Samorodov <bsam_at_passap.ru>
Date: Sat, 01 Feb 2014 23:11:20 +0400
Hi All,

While using clang static analyzer at CURRENT (r261322) I got:
http://gw.wart.ru/2014-02-01-200848-39517-1/report-01bc48.html

There is no need at line 143 to "goto cleanup_svc_vc_create" (neither
xprt nor r are allocated so far). Just "return NULL" should be fine.
BTW, NetBSD do the latter as well.

So I propose a tiny patch (attached).

-- 
WBR, Boris Samorodov (bsam)
FreeBSD Committer, http://www.FreeBSD.org The Power To Serve


Received on Sat Feb 01 2014 - 18:11:33 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:46 UTC