diff mbox

[U-Boot,1/1] api: remove superfluous assignment

Message ID 20170730175437.8220-1-xypron.glpk@gmx.de
State Accepted
Commit 5cc9e6b7fa4fac8dc7b709af3bd6f259171ff0bb
Delegated to: Tom Rini
Headers show

Commit Message

Heinrich Schuchardt July 30, 2017, 5:54 p.m. UTC
No need to assign a value to sig if the next statement using sig
is itself an assignment of a value to sig.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
 api/api.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Simon Glass Aug. 1, 2017, 9:49 a.m. UTC | #1
On 30 July 2017 at 11:54, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
> No need to assign a value to sig if the next statement using sig
> is itself an assignment of a value to sig.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> ---
>  api/api.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini Aug. 14, 2017, 12:06 a.m. UTC | #2
On Sun, Jul 30, 2017 at 07:54:37PM +0200, xypron.glpk@gmx.de wrote:

> No need to assign a value to sig if the next statement using sig
> is itself an assignment of a value to sig.
> 
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/api/api.c b/api/api.c
index c368511704..4fae95d280 100644
--- a/api/api.c
+++ b/api/api.c
@@ -625,7 +625,7 @@  int syscall(int call, int *retval, ...)
 
 void api_init(void)
 {
-	struct api_signature *sig = NULL;
+	struct api_signature *sig;
 
 	/* TODO put this into linker set one day... */
 	calls_table[API_RSVD] = NULL;