mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 03:18:11 +00:00
Everywhere: void arguments to C functions
Problem: - C functions with no arguments require a single `void` in the argument list. Solution: - Put the `void` in the argument list of functions in C header files.
This commit is contained in:
parent
b990fc5d3a
commit
b2316701a8
14 changed files with 29 additions and 29 deletions
|
@ -1021,7 +1021,7 @@ unsigned long long strtoull(const char* str, char** endptr, int base)
|
|||
// Serenity's PRNG is not cryptographically secure. Do not rely on this for
|
||||
// any real crypto! These functions (for now) are for compatibility.
|
||||
// TODO: In the future, rand can be made deterministic and this not.
|
||||
uint32_t arc4random()
|
||||
uint32_t arc4random(void)
|
||||
{
|
||||
char buf[4];
|
||||
syscall(SC_getrandom, buf, 4, 0);
|
||||
|
|
|
@ -41,13 +41,13 @@ __BEGIN_DECLS
|
|||
__attribute__((malloc)) __attribute__((alloc_size(1))) void* malloc(size_t);
|
||||
__attribute__((malloc)) __attribute__((alloc_size(1, 2))) void* calloc(size_t nmemb, size_t);
|
||||
size_t malloc_size(void*);
|
||||
void serenity_dump_malloc_stats();
|
||||
void serenity_dump_malloc_stats(void);
|
||||
void free(void*);
|
||||
__attribute__((alloc_size(2))) void* realloc(void* ptr, size_t);
|
||||
char* getenv(const char* name);
|
||||
int putenv(char*);
|
||||
int unsetenv(const char*);
|
||||
int clearenv();
|
||||
int clearenv(void);
|
||||
int setenv(const char* name, const char* value, int overwrite);
|
||||
int atoi(const char*);
|
||||
long atol(const char*);
|
||||
|
@ -87,7 +87,7 @@ void srand(unsigned seed);
|
|||
long int random();
|
||||
void srandom(unsigned seed);
|
||||
|
||||
uint32_t arc4random();
|
||||
uint32_t arc4random(void);
|
||||
void arc4random_buf(void*, size_t);
|
||||
uint32_t arc4random_uniform(uint32_t);
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ void closelog_r(struct syslog_data* data)
|
|||
data->maskpri = LOG_UPTO(LOG_DEBUG);
|
||||
}
|
||||
|
||||
void closelog()
|
||||
void closelog(void)
|
||||
{
|
||||
closelog_r(&global_log_data);
|
||||
}
|
||||
|
|
|
@ -169,7 +169,7 @@ void vsyslog(int, const char* message, va_list);
|
|||
void vsyslog_r(int, struct syslog_data* data, const char* message, va_list);
|
||||
void openlog(const char*, int, int);
|
||||
void openlog_r(const char*, int, int, struct syslog_data*);
|
||||
void closelog();
|
||||
void closelog(void);
|
||||
void closelog_r(struct syslog_data*);
|
||||
int setlogmask(int);
|
||||
int setlogmask_r(int, struct syslog_data*);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue