Good C practices
This commit is contained in:
@@ -76,7 +76,7 @@ static void print_usage(char** argv) {
|
||||
exit(0);
|
||||
}
|
||||
|
||||
static void load_css() {
|
||||
static void load_css(void) {
|
||||
if(access(stylesheet, R_OK) == 0) {
|
||||
FILE* file = fopen(stylesheet, "r");
|
||||
fseek(file, 0, SEEK_END);
|
||||
|
@@ -25,14 +25,14 @@ struct map {
|
||||
struct map* head, *left, *right;
|
||||
};
|
||||
|
||||
struct map* map_init() {
|
||||
struct map* map_init(void) {
|
||||
struct map* map = calloc(1, sizeof(struct map));
|
||||
map->head = map;
|
||||
map->mman = true;
|
||||
return map;
|
||||
}
|
||||
|
||||
struct map* map_init_void() {
|
||||
struct map* map_init_void(void) {
|
||||
struct map* map = map_init();
|
||||
map->mman = false;
|
||||
return map;
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
#include <utils.h>
|
||||
|
||||
time_t utils_get_time_millis() {
|
||||
time_t utils_get_time_millis(void) {
|
||||
struct timeval time;
|
||||
gettimeofday(&time, NULL);
|
||||
return (time.tv_sec * 1000) + (time.tv_usec / 1000);
|
||||
|
10
src/wofi.c
10
src/wofi.c
@@ -555,23 +555,23 @@ void wofi_insert_widget(char* mode, char** text, char* search_text, char** actio
|
||||
utils_sleep_millis(1);
|
||||
}
|
||||
|
||||
bool wofi_allow_images() {
|
||||
bool wofi_allow_images(void) {
|
||||
return allow_images;
|
||||
}
|
||||
|
||||
bool wofi_allow_markup() {
|
||||
bool wofi_allow_markup(void) {
|
||||
return allow_markup;
|
||||
}
|
||||
|
||||
uint64_t wofi_get_image_size() {
|
||||
uint64_t wofi_get_image_size(void) {
|
||||
return image_size;
|
||||
}
|
||||
|
||||
bool wofi_mod_shift() {
|
||||
bool wofi_mod_shift(void) {
|
||||
return mod_shift;
|
||||
}
|
||||
|
||||
bool wofi_mod_control() {
|
||||
bool wofi_mod_control(void) {
|
||||
return mod_ctrl;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user