diff options
author | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-03 19:03:11 +0200 |
---|---|---|
committer | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-03 19:03:11 +0200 |
commit | 20b85c03e751b4876fa3c92040464e483172b746 (patch) | |
tree | 734fadbfdbc143ec4465093857f4c239448715e0 /src/qbiff.c | |
parent | a6a7d6ce079cabdaf2fa502b2e2cf15e5428ac6f (diff) |
manual format adjustment
Diffstat (limited to 'src/qbiff.c')
-rw-r--r-- | src/qbiff.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/qbiff.c b/src/qbiff.c index 186e524..800e1f2 100644 --- a/src/qbiff.c +++ b/src/qbiff.c @@ -2,7 +2,19 @@ #include <sys/types.h> #include <unistd.h> +#include "buffer.h" +#include "byte.h" +#include "env.h" +#include "exit.h" +#include "open.h" +#include "str.h" +#include "stralloc.h" + #include "hasutmp.h" +#include "headerbody.h" +#include "hfield.h" + + #ifdef HASUTMP #include <utmp.h> #ifndef UTMP_FILE @@ -15,16 +27,6 @@ #else #include <utmpx.h> #endif -#include "buffer.h" -#include "byte.h" -#include "env.h" -#include "exit.h" -#include "open.h" -#include "str.h" -#include "stralloc.h" - -#include "headerbody.h" -#include "hfield.h" buffer b; #ifdef HASUTMP @@ -67,10 +69,7 @@ void doheader(stralloc *h) } } -void finishheader() -{ - ; -} +void finishheader() {} int main() { @@ -117,10 +116,10 @@ int main() if (fdutmp == -1) _exit(0); buffer_init(&b, read, fdutmp, bufutmp, sizeof(bufutmp)); - while (buffer_get(&b, &ut, sizeof(ut)) == sizeof(ut)) + while (buffer_get(&b, &ut, sizeof(ut)) == sizeof(ut)) { if (!str_diffn(ut.ut_name, user, sizeof(ut.ut_name))) { #else - while ((ut = getutxent()) != 0) + while ((ut = getutxent()) != 0) { if (ut->ut_type == USER_PROCESS && !str_diffn(ut->ut_user, user, sizeof(ut->ut_user))) { #endif #ifdef HASUTMP @@ -152,5 +151,6 @@ int main() buffer_putflush(&b, woof.s, woof.len); close(fdtty); } + } _exit(0); } |