Skip to content
Myr

event.c

This file

Path

event.c

18 lines · 324 bytes · C

Last changed by

Not known.

History of this file

Take it

The walk stopped after 200 commits: lines older than 6a4c416 point at it.

changelog: add missing refDaniel Eklöfbefore adoption6a4c416

lines 1–18why, one step back
1#include "event.h"
23#include <errno.h>4#include <stdint.h>5#include <unistd.h>67int8send_event(int fd, enum event_type event)9{10 ssize_t bytes = write(fd, &(uint64_t){event}, sizeof(uint64_t));1112 if (bytes < 0)13 return -errno;14 else if (bytes != (ssize_t)sizeof(uint64_t))15 return 1;16 return 0;17}18