From: Robert Schwebel <r.schwebel@domain.hid>
To: xenomai-core <xenomai@xenomai.org>
Subject: [Xenomai-core] [PATCH][SOLO] sparse fix: use NULL instead of 0
Date: Tue, 1 Apr 2008 12:43:11 +0200 [thread overview]
Message-ID: <20080401104311.GT13814@domain.hid> (raw)
In-Reply-To: <20080401103647.GR13814@domain.hid>
Sparse has found this, fixed by the patch below:
tlsf/tlsf.c:383:51: warning: Using plain integer as NULL pointer
tlsf/tlsf.c:388:16: warning: Using plain integer as NULL pointer
tlsf/tlsf.c:467:16: warning: Using plain integer as NULL pointer
tlsf/tlsf.c:383:51: warning: Using plain integer as NULL pointer
tlsf/tlsf.c:388:16: warning: Using plain integer as NULL pointer
Signed-off-by: Robert Schwebel <r.schwebel@domain.hid>
---
base/tlsf/tlsf.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: xenomai-solo/base/tlsf/tlsf.c
===================================================================
--- xenomai-solo.orig/base/tlsf/tlsf.c 2008-03-29 22:54:41.000000000 +0100
+++ xenomai-solo/base/tlsf/tlsf.c 2008-03-30 19:49:59.000000000 +0200
@@ -380,12 +380,12 @@
MIN_BLOCK_SIZE) ? MIN_BLOCK_SIZE : ROUNDUP_SIZE(sizeof(area_info_t)) | USED_BLOCK | PREV_USED;
b = (bhdr_t *) GET_NEXT_BLOCK(ib->ptr.buffer, ib->size & BLOCK_SIZE);
b->size = ROUNDDOWN_SIZE(size - 3 * BHDR_OVERHEAD - (ib->size & BLOCK_SIZE)) | USED_BLOCK | PREV_USED;
- b->ptr.free_ptr.prev = b->ptr.free_ptr.next = 0;
+ b->ptr.free_ptr.prev = b->ptr.free_ptr.next = NULL;
lb = GET_NEXT_BLOCK(b->ptr.buffer, b->size & BLOCK_SIZE);
lb->prev_hdr = b;
lb->size = 0 | USED_BLOCK | PREV_FREE;
ai = (area_info_t *) ib->ptr.buffer;
- ai->next = 0;
+ ai->next = NULL;
ai->end = lb;
return ib;
}
@@ -464,7 +464,7 @@
memset(area, 0, area_size);
ptr = tlsf->area_head;
- ptr_prev = 0;
+ ptr_prev = NULL;
ib0 = process_area(area, area_size);
b0 = GET_NEXT_BLOCK(ib0->ptr.buffer, ib0->size & BLOCK_SIZE);
--
Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
Pengutronix - Linux Solutions for Science and Industry
Handelsregister: Amtsgericht Hildesheim, HRA 2686
Hannoversche Str. 2, 31134 Hildesheim, Germany
Phone: +49-5121-206917-0 | Fax: +49-5121-206917-9
next prev parent reply other threads:[~2008-04-01 10:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-01 10:36 [Xenomai-core] [PATCH][SOLO] add sparse support Robert Schwebel
2008-04-01 10:43 ` Robert Schwebel [this message]
2008-04-01 10:44 ` [Xenomai-core] [PATCH][SOLO] sparse: clockobj_unmap not declared Robert Schwebel
2008-04-01 10:44 ` [Xenomai-core] [PATCH][SOLO] sparse: threadobj_global_rr " Robert Schwebel
2008-04-01 10:45 ` [Xenomai-core] [PATCH][SOLO] sparse: include panic header file Robert Schwebel
2008-04-01 10:46 ` [Xenomai-core] [PATCH][SOLO] sparse: include sysClkRateGet declaration Robert Schwebel
2008-04-01 14:38 ` [Xenomai-core] [PATCH][SOLO] add sparse support Uwe Kleine-König
2008-04-03 9:37 ` Philippe Gerum
2008-04-04 12:22 ` Robert Schwebel
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=20080401104311.GT13814@domain.hid \
--to=r.schwebel@domain.hid \
--cc=xenomai@xenomai.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.