Use "void" for empty argument list in declarations
In C, an empty argument list in a declaration means that the function can accept any arguments. Use "void" instead, it means "no arguments". C++ treats void and empty list as "no arguments".
This commit is contained in:
+4
-4
@@ -37,8 +37,8 @@
|
||||
#include <errno.h>
|
||||
|
||||
/* forward declarations */
|
||||
int run_echo_test();
|
||||
int run_tsmf_test();
|
||||
int run_echo_test(void);
|
||||
int run_tsmf_test(void);
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
@@ -76,7 +76,7 @@ main(int argc, char **argv)
|
||||
* @return 0 on success, -1 on failure
|
||||
*/
|
||||
int
|
||||
run_echo_test()
|
||||
run_echo_test(void)
|
||||
{
|
||||
char out_buf[8192];
|
||||
char in_buf[1700];
|
||||
@@ -162,7 +162,7 @@ run_echo_test()
|
||||
}
|
||||
|
||||
int
|
||||
run_tsmf_test()
|
||||
run_tsmf_test(void)
|
||||
{
|
||||
void *channel;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user