[U-Boot] [PATCH 1/2] cmd: usb_mass_storage: Use NULL for pointer

Fabio Estevam festevam at gmail.com
Sat May 28 03:37:10 CEST 2016


From: Fabio Estevam <fabio.estevam at nxp.com>

Use NULL for pointer to fix the following sparse warning:
cmd/usb_mass_storage.c:47:15: warning: Using plain integer as NULL pointer

Signed-off-by: Fabio Estevam <fabio.estevam at nxp.com>
---
 cmd/usb_mass_storage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmd/usb_mass_storage.c b/cmd/usb_mass_storage.c
index b05913a..2eb113c 100644
--- a/cmd/usb_mass_storage.c
+++ b/cmd/usb_mass_storage.c
@@ -44,7 +44,7 @@ static void ums_fini(void)
 	for (i = 0; i < ums_count; i++)
 		free((void *)ums[i].name);
 	free(ums);
-	ums = 0;
+	ums = NULL;
 	ums_count = 0;
 }
 
-- 
1.9.1



More information about the U-Boot mailing list