aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsin <sin@2f30.org>2014-02-09 12:43:18 +0000
committersin <sin@2f30.org>2014-02-09 12:43:18 +0000
commit7345487258eacdabbb6a6335ab71e3c41ca79a3d (patch)
treeaf1cc71003eaf77b169d50e5a3a52d7c49fadea3
parent88d185e42ba5e7e4eed1393c1042aede529d13ce (diff)
Simplify naming of variables
-rw-r--r--sinit.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/sinit.c b/sinit.c
index bd5c4ff..f177803 100644
--- a/sinit.c
+++ b/sinit.c
@@ -31,9 +31,9 @@ static Sigmap dispatchsig[] = {
int
main(void)
{
- struct signalfd_siginfo siginfo;
- sigset_t sigset;
- int sigfd;
+ struct signalfd_siginfo si;
+ sigset_t set;
+ int fd;
int i;
ssize_t n;
@@ -41,30 +41,30 @@ main(void)
return EXIT_FAILURE;
setsid();
- if (sigemptyset(&sigset) < 0)
+ if (sigemptyset(&set) < 0)
eprintf("sinit: sigemptyset:");
for (i = 0; i < LEN(dispatchsig); i++)
- if (sigaddset(&sigset, dispatchsig[i].sig) < 0)
+ if (sigaddset(&set, dispatchsig[i].sig) < 0)
eprintf("sinit: sigaddset:");
- if (sigprocmask(SIG_BLOCK, &sigset, NULL) < 0)
+ if (sigprocmask(SIG_BLOCK, &set, NULL) < 0)
eprintf("sinit: sigprocmask:");
- sigfd = signalfd(-1, &sigset, SFD_CLOEXEC);
- if (sigfd < 0)
+ fd = signalfd(-1, &set, SFD_CLOEXEC);
+ if (fd < 0)
eprintf("sinit: signalfd:");
spawn(rcinitcmd);
while (1) {
- n = read(sigfd, &siginfo, sizeof(siginfo));
+ n = read(fd, &si, sizeof(si));
if (n < 0)
eprintf("sinit: read:");
- if (n != sizeof(siginfo))
+ if (n != sizeof(si))
continue;
for (i = 0; i < LEN(dispatchsig); i++)
- if (dispatchsig[i].sig == siginfo.ssi_signo)
+ if (dispatchsig[i].sig == si.ssi_signo)
dispatchsig[i].func();
}