mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 11/12] fs FAT: fix warning: Using plain integer as NULL pointer
Date: Mon, 25 Jun 2012 19:38:29 +0200	[thread overview]
Message-ID: <1340645910-15668-12-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1340645910-15668-1-git-send-email-s.hauer@pengutronix.de>

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 fs/fat/ff.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/fs/fat/ff.c b/fs/fat/ff.c
index 2d476ee..66db1d6 100644
--- a/fs/fat/ff.c
+++ b/fs/fat/ff.c
@@ -1043,7 +1043,7 @@ int dir_register (	/* 0:Successful, FR_DENIED:No free entry or too many SFN coll
 
 	if (sn[NS] & NS_LOSS) {
 		/* When LFN is out of 8.3 format, generate a numbered name */
-		fn[NS] = 0; dj->lfn = 0; /* Find only SFN */
+		fn[NS] = 0; dj->lfn = NULL; /* Find only SFN */
 		for (n = 1; n < 100; n++) {
 			gen_numname(fn, sn, lfn, n); /* Generate a numbered name */
 			res = dir_find(dj); /* Check if the name collides with existing SFN */
@@ -1496,7 +1496,7 @@ int follow_path (	/* 0(0): successful, !=0: error code */
 	if ((UINT)*path < ' ') {
 		/* Nul path means the start directory itself */
 		res = dir_sdi(dj, 0);
-		dj->dir = 0;
+		dj->dir = NULL;
 		return res;
 	}
 
@@ -1718,7 +1718,7 @@ int f_open (
 	DEF_NAMEBUF;
 
 
-	fp->fs = 0;		/* Clear file object */
+	fp->fs = NULL;		/* Clear file object */
 
 #ifdef CONFIG_FS_FAT_WRITE
 	mode &= FA_READ | FA_WRITE | FA_CREATE_ALWAYS | FA_OPEN_ALWAYS | FA_CREATE_NEW;
@@ -2059,7 +2059,7 @@ int f_close (
 	/* Flush cached data */
 	res = f_sync(fp);
 	if (res == 0)
-		fp->fs = 0;	/* Discard file object */
+		fp->fs = NULL;	/* Discard file object */
 	return res;
 #endif
 }
@@ -2308,7 +2308,7 @@ int f_getfree (
 	} else {
 		clst = fatfs->n_fatent;
 		sect = fatfs->fatbase;
-		i = 0; p = 0;
+		i = 0; p = NULL;
 		do {
 			if (!i) {
 				res = move_window(fatfs, sect++);
-- 
1.7.10


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2012-06-25 17:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-25 17:38 [PATCH] sparse fixes Sascha Hauer
2012-06-25 17:38 ` [PATCH 01/12] MMC i.MX esdhc: Fix sparse warnings Sascha Hauer
2012-06-25 17:38 ` [PATCH 02/12] tlsf: Use NULL instead of 0 for returning NULL pointers Sascha Hauer
2012-06-25 17:38 ` [PATCH 03/12] qsort: declare strcmp_compar publically Sascha Hauer
2012-06-25 17:38 ` [PATCH 04/12] Do not use iomem space for dev_get_mem_region Sascha Hauer
2012-06-25 17:38 ` [PATCH 05/12] define __user empty Sascha Hauer
2012-06-25 17:38 ` [PATCH 06/12] ARM i.MX speed: sparse fixes Sascha Hauer
2012-06-25 17:38 ` [PATCH 07/12] USB ohci: Fix sparse warnings Sascha Hauer
2012-06-25 17:38 ` [PATCH 08/12] net smc911x: Use __iomem for register base Sascha Hauer
2012-06-25 17:38 ` [PATCH 09/12] ARM i.MX clocksource: put registers in iomem space Sascha Hauer
2012-06-25 17:38 ` [PATCH 10/12] USB gadget fsl: Put registers into " Sascha Hauer
2012-06-25 17:38 ` Sascha Hauer [this message]
2012-06-25 17:38 ` [PATCH 12/12] of: Fix usage of 0 as NULL pointer Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1340645910-15668-12-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox