Skip to contentSkip to conversation

super-intel.c: use %zu specifier for printf of size_t

PATCH Applied Luca Berra 3 participants 3 messages Jan 30, 2010 – Jan 31, 2010 MD RAID

lore
Share & tools
lore

Luca Berra

author
#0 lore raw

PATCH 1/1 super-intel.c: use %zu specifier for printf of size_t

---
 super-intel.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
super-intel.c +1 -1
index fcf438c..91479a2 100644
@@ -4076,7 +4076,7 @@ static struct mdinfo *container_content_imsm(struct supertype *st)
 
 		this = malloc(sizeof(*this));
 		if (!this) {
-			fprintf(stderr, Name ": failed to allocate %lu bytes\n",
+			fprintf(stderr, Name ": failed to allocate %zu bytes\n",
 				sizeof(*this));
 			break;
 		}
Signature · 6 lines
Luca Berra -- [email protected]
        Communication Media & Services S.r.l.
 /"\
 \ /     ASCII RIBBON CAMPAIGN
  X        AGAINST HTML MAIL
 / \
Applied
#2 lore raw
In reply to Luca Berra
Quoted 11 lines · On Sat, 30 Jan 2010 10:59:29 +0100 Luca Berra <[email protected]> wrote:
---
  super-intel.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
super-intel.c +0 -0
index fcf438c..91479a2 100644

super-intel.c static struct mdinfo *container_content_imsm(struct supertype *st) · line 4082

Quoted 8 lines
super-intel.c +1 -1
@@ -4076,7 +4076,7 @@ static struct mdinfo *container_content_imsm(struct supertype *st)
 
  		this = malloc(sizeof(*this));
  		if (!this) {
-			fprintf(stderr, Name ": failed to allocate %lu bytes\n",
+			fprintf(stderr, Name ": failed to allocate %zu bytes\n",
  				sizeof(*this));
  			break;
  		}

Applied, thanks.

NeilBrown