Skip to content

Commit

Permalink
Fix warnings in announce example
Browse files Browse the repository at this point in the history
  • Loading branch information
rolznz authored and tguillem committed Aug 21, 2019
1 parent 3876182 commit 6b5a3ad
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions examples/announce.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,21 @@

volatile sig_atomic_t sigflag = 0;

void sighandler(int signum)
static void sighandler(int signum)
{
char s[] = "SIGINT received, exiting ...\n";

write(fileno(stdout), s, sizeof(s));
ssize_t result = write(fileno(stdout), s, sizeof(s));
(void)result;
sigflag = 1;
}

bool stop(void *cbarg)
static bool stop(void *cbarg)
{
return (sigflag ? true : false);
}

void callback(void *cbarg, int r, const struct rr_entry *entry)
static void callback(void *cbarg, int r, const struct rr_entry *entry)
{
struct mdns_ctx *ctx = (struct mdns_ctx *) cbarg;
struct mdns_hdr hdr = {0};
Expand Down

0 comments on commit 6b5a3ad

Please sign in to comment.