hv:Fix unused var value on all paths

MISRAC checks whether a variable is assigned a value not used in
all branches of a program. Var value which is unused on all paths
can be removed with a consequent improvement in the readability
and efficiency of the code. This patch is used to fix these
violations.

Tracked-On: #861
Signed-off-by: Junjun Shan <junjun.shan@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Junjun Shan
2018-09-19 18:04:29 +08:00
committed by lijinxia
parent f1cce6710a
commit 89ca54cafa
8 changed files with 29 additions and 27 deletions

View File

@@ -657,7 +657,7 @@ int vsnprintf(char *dst_arg, size_t sz_arg, const char *fmt, va_list args)
{
char *dst = dst_arg;
uint32_t sz = sz_arg;
int res = 0;
int res;
if ((sz == 0U) || (dst == NULL)) {
return -1;