Use void for functions with no parameters

This commit is contained in:
Ashish Kumar Yadav 2021-08-17 22:04:37 +05:30
parent 28b7776611
commit def465d760
2 changed files with 11 additions and 11 deletions

View file

@ -23,14 +23,14 @@ _Static_assert(INTERVALs >= 0, "INTERVALs must be greater than or equal to 0");
_Static_assert(INTERVALn >= 0 && INTERVALn <= 999999999, "INTERVALn must be between 0 and 999999999");
static void buttonhandler(int sig, siginfo_t *info, void *ucontext);
static void cleanup();
static void setupsignals();
static void cleanup(void);
static void setupsignals(void);
static void sighandler(int sig, siginfo_t *si, void *ucontext);
static void statusloop();
static void statusloop(void);
static void termhandler(int sig);
static void updateblock(Block *block, int sigval);
static void updatestatus();
static void writepid();
static void updatestatus(void);
static void writepid(void);
static Block *dirtyblock;
static Display *dpy;
@ -60,7 +60,7 @@ buttonhandler(int sig, siginfo_t *info, void *ucontext)
}
void
cleanup()
cleanup(void)
{
unlink(LOCKFILE);
XStoreName(dpy, DefaultRootWindow(dpy), "");
@ -68,7 +68,7 @@ cleanup()
}
void
setupsignals()
setupsignals(void)
{
struct sigaction sa;
@ -137,7 +137,7 @@ sighandler(int sig, siginfo_t *info, void *ucontext)
}
void
statusloop()
statusloop(void)
{
int i;
struct timespec t;
@ -243,7 +243,7 @@ updateblock(Block *block, int sigval)
}
void
updatestatus()
updatestatus(void)
{
static char statustext[STATUSLENGTH];
char *s = statustext;
@ -265,7 +265,7 @@ updatestatus()
}
void
writepid()
writepid(void)
{
int fd;
struct flock fl;

View file

@ -2,7 +2,7 @@
#include <X11/Xlib.h>
int
main()
main(void)
{
char *name;
Display *dpy;