aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-07-05 17:23:46 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-07-05 17:23:46 -0700
commiteb04727532a80e6119a8a90282e2c3f7be8a8564 (patch)
treec7692e1d0bb427308f5f3ddce259fbdab5a28211
parentad45d3005886d051dae17180ef28be3f1b6dbaac (diff)
downloadsyslinux-elf-eb04727532a80e6119a8a90282e2c3f7be8a8564.tar.gz
syslinux-elf-eb04727532a80e6119a8a90282e2c3f7be8a8564.tar.xz
syslinux-elf-eb04727532a80e6119a8a90282e2c3f7be8a8564.zip
elflink: fix functions with () instead of (void)
In C++, () is used to indicate a function with no parameters. In C, this is spelled (void). In C, () means the same thing as (...) which really isn't what we want. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--com32/include/stdlib.h2
-rw-r--r--com32/include/sys/exec.h4
-rw-r--r--com32/lib/malloc.c5
-rw-r--r--com32/lib/sys/module/exec.c18
4 files changed, 18 insertions, 11 deletions
diff --git a/com32/include/stdlib.h b/com32/include/stdlib.h
index f1989539..2135569b 100644
--- a/com32/include/stdlib.h
+++ b/com32/include/stdlib.h
@@ -45,7 +45,7 @@ __extern int posix_memalign(void **memptr, size_t alignment,
__extern void free(void *);
-__extern void *__mem_get_tag_global();
+__extern void *__mem_get_tag_global(void);
__extern void __mem_set_tag_global(void *tag);
__extern void *__mem_get_tag(void *memptr);
diff --git a/com32/include/sys/exec.h b/com32/include/sys/exec.h
index 44b1e741..31a1af2e 100644
--- a/com32/include/sys/exec.h
+++ b/com32/include/sys/exec.h
@@ -37,7 +37,7 @@
* loaded by the lower module layer gets to be executed by the CPU,
* thus becoming part of the SYSLINUX environment.
*/
-extern int exec_init();
+extern int exec_init(void);
/**
@@ -103,7 +103,7 @@ extern int spawnl(const char *name, const char *arg, ...);
/**
* exec_term - Releases the resources of the execution environment.
*/
-extern void exec_term();
+extern void exec_term(void);
#endif /* EXEC_H_ */
diff --git a/com32/lib/malloc.c b/com32/lib/malloc.c
index ff6e5b9e..235ffa62 100644
--- a/com32/lib/malloc.c
+++ b/com32/lib/malloc.c
@@ -167,7 +167,8 @@ void *malloc(size_t size)
return NULL; /* No kernel to get stuff from */
}
-int posix_memalign(void **memptr, size_t alignment, size_t size) {
+int posix_memalign(void **memptr, size_t alignment, size_t size)
+{
struct free_arena_header *fp, *nfp;
uintptr_t align_mask, align_addr;
@@ -248,7 +249,7 @@ int posix_memalign(void **memptr, size_t alignment, size_t size) {
return 0;
}
-void *__mem_get_tag_global() {
+void *__mem_get_tag_global(void) {
return __global_tag;
}
diff --git a/com32/lib/sys/module/exec.c b/com32/lib/sys/module/exec.c
index e545fb10..34578ed0 100644
--- a/com32/lib/sys/module/exec.c
+++ b/com32/lib/sys/module/exec.c
@@ -21,7 +21,8 @@ extern char _start[];
static struct elf_module *mod_root = NULL;
-int exec_init() {
+int exec_init(void)
+{
int res;
res = modules_init();
@@ -45,7 +46,8 @@ int exec_init() {
return 0;
}
-int load_library(const char *name) {
+int load_library(const char *name)
+{
int res;
struct elf_module *module = module_alloc(name);
@@ -81,7 +83,8 @@ int load_library(const char *name) {
return 0;
}
-int unload_library(const char *name) {
+int unload_library(const char *name)
+{
int res;
struct elf_module *module = module_find(name);
@@ -101,7 +104,8 @@ int unload_library(const char *name) {
return res;
}
-int spawnv(const char *name, const char **argv) {
+int spawnv(const char *name, const char **argv)
+{
int res, ret_val = 0;
struct elf_module *module = module_alloc(name);
@@ -148,7 +152,8 @@ int spawnv(const char *name, const char **argv) {
return ((unsigned int)ret_val & 0xFF);
}
-int spawnl(const char *name, const char *arg, ...) {
+int spawnl(const char *name, const char *arg, ...)
+{
/*
* NOTE: We assume the standard ABI specification for the i386
* architecture. This code may not work if used in other
@@ -160,6 +165,7 @@ int spawnl(const char *name, const char *arg, ...) {
}
-void exec_term() {
+void exec_term(void)
+{
modules_term();
}