summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sent.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/sent.c b/sent.c
index 87e2a2d..b5c2c52 100644
--- a/sent.c
+++ b/sent.c
@@ -106,12 +106,12 @@ static void pdf();
static void toggle_cursor(const Arg *arg);
static void quit(const Arg *arg);
static void resize(int width, int height);
-static void run();
-static void usage();
-static void xdraw();
-static void xhints();
-static void xinit();
-static void xloadfonts();
+static void run(void);
+static void usage(void);
+static void xdraw(void);
+static void xhints(void);
+static void xinit(void);
+static void xloadfonts(void);
static void bpress(XEvent *);
static void cmessage(XEvent *);
@@ -223,8 +223,7 @@ ffload(Slide *s)
s->img->bufwidth = ntohl(*(uint32_t *)&hdr[8]);
s->img->bufheight = ntohl(*(uint32_t *)&hdr[12]);
- if (s->img->buf)
- free(s->img->buf);
+ free(s->img->buf);
/* internally the image is stored in 888 format */
s->img->buf = ecalloc(s->img->bufwidth * s->img->bufheight, strlen("888"));
@@ -601,7 +600,7 @@ resize(int width, int height)
}
void
-run()
+run(void)
{
XEvent ev;
@@ -623,7 +622,7 @@ run()
}
void
-xdraw()
+xdraw(void)
{
unsigned int height, width, i;
Image *im = slides[idx].img;
@@ -651,7 +650,7 @@ xdraw()
}
void
-xhints()
+xhints(void)
{
XClassHint class = {.res_name = "sent", .res_class = "presenter"};
XWMHints wm = {.flags = InputHint, .input = True};
@@ -669,7 +668,7 @@ xhints()
}
void
-xinit()
+xinit(void)
{
XTextProperty prop;
unsigned int i;
@@ -713,7 +712,7 @@ xinit()
}
void
-xloadfonts()
+xloadfonts(void)
{
int i, j;
char *fstrs[LEN(fontfallbacks)];
@@ -732,8 +731,7 @@ xloadfonts()
}
for (j = 0; j < LEN(fontfallbacks); j++)
- if (fstrs[j])
- free(fstrs[j]);
+ free(fstrs[j]);
}
void
@@ -782,7 +780,7 @@ configure(XEvent *e)
}
void
-usage()
+usage(void)
{
die("usage: %s [-c fgcolor] [-b bgcolor] [-f font] [file]", argv0);
}