diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2007-11-15 23:55:47 +0100 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2007-11-29 10:22:49 +0100 |
commit | 66bdf91279122e5ef3de7f1b09f651d409e624a2 (patch) | |
tree | dd871be830818c3ec2458d0de893e7b55210b08f | |
parent | c27f282cc382eed84e18c5b7f4f5aa46d2989ad3 (diff) | |
download | barebox-66bdf91279122e5ef3de7f1b09f651d409e624a2.tar.gz barebox-66bdf91279122e5ef3de7f1b09f651d409e624a2.tar.xz |
[sparse] define functions static, use NULL as NULL pointer
fixes:
arch/sandbox/board/hostfile.c:32:9: warning: symbol 'hf_read' was not declared. Should it be static?
arch/sandbox/board/hostfile.c:43:9: warning: symbol 'hf_write' was not declared. Should it be static?
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-rw-r--r-- | arch/sandbox/lib/common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sandbox/lib/common.c b/arch/sandbox/lib/common.c index 4fd4eef208..cd5c1c622a 100644 --- a/arch/sandbox/lib/common.c +++ b/arch/sandbox/lib/common.c @@ -193,7 +193,7 @@ void flush_cache(unsigned long dummy1, unsigned long dummy2) extern void start_uboot(void); extern void mem_malloc_init(void *start, void *end); -int add_image(char *str, char *name_template) +static int add_image(char *str, char *name_template) { char *file; int readonly = 0, map = 1; @@ -232,7 +232,7 @@ int add_image(char *str, char *name_template) hf->size = s.st_size; if (map) { - hf->map_base = (unsigned long)mmap(0, hf->size, + hf->map_base = (unsigned long)mmap(NULL, hf->size, PROT_READ | (readonly ? 0 : PROT_WRITE), MAP_SHARED, fd, 0); if ((void *)hf->map_base == MAP_FAILED) |