tools: zynqimage: Clean up check_params
authorNathan Rossi <nathan@nathanrossi.com>
Tue, 8 Dec 2015 14:44:43 +0000 (00:44 +1000)
committerMichal Simek <michal.simek@xilinx.com>
Fri, 18 Dec 2015 12:15:57 +0000 (13:15 +0100)
Clean up the param checking, removing some code paths that will never
happen.

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: Tom Rini <trini@konsulko.com>
Reported-by: Coverity (CID 133251)
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
tools/zynqimage.c

index 25f558d24c789c0dbf119db88dff156ab4fdbb85..c43bd5d48820a1ba9337cc93b85fff08f21d461a 100644 (file)
@@ -212,8 +212,7 @@ static int zynqimage_check_params(struct image_tool_params *params)
                return -1;
        }
 
-       return !((params->lflag || params->dflag) ||
-                       (params->dflag && params->eflag));
+       return !(params->lflag || params->dflag);
 }
 
 static int zynqimage_check_image_types(uint8_t type)