From 62b4073ccdf0ec1b0cef32156856d4ec770dda03 Mon Sep 17 00:00:00 2001 From: ck <84600276+critkitten@users.noreply.github.com> Date: Sun, 18 Jun 2023 18:09:17 +0200 Subject: [PATCH] Update utils.c spaces --- alsactl/utils.c | 88 ++++++++++++++++++++++++------------------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/alsactl/utils.c b/alsactl/utils.c index 090ffe1..fd9e71d 100644 --- a/alsactl/utils.c +++ b/alsactl/utils.c @@ -81,50 +81,50 @@ size_t line_width(const char *buf, size_t bufsize, size_t pos) void initfailed(int cardnumber, const char *reason, int exitcode) { - int fp; - char *str; - char sexitcode[16]; - ssize_t bytes_written; - - if (statefile == NULL) - return; - if (snd_card_get_name(cardnumber, &str) < 0) - return; - sprintf(sexitcode, "%i", exitcode); - fp = open(statefile, O_WRONLY|O_CREAT|O_APPEND, 0644); - - bytes_written = write(fp, str, strlen(str)); - if (bytes_written != strlen(str)) { - // Handle error - } - - bytes_written = write(fp, ":", 1); - if (bytes_written != 1) { - // Handle error - } - - bytes_written = write(fp, reason, strlen(reason)); - if (bytes_written != strlen(reason)) { - // Handle error - } - - bytes_written = write(fp, ":", 1); - if (bytes_written != 1) { - // Handle error - } - - bytes_written = write(fp, sexitcode, strlen(sexitcode)); - if (bytes_written != strlen(sexitcode)) { - // Handle error - } - - bytes_written = write(fp, "\n", 1); - if (bytes_written != 1) { - // Handle error - } - - close(fp); - free(str); + int fp; + char *str; + char sexitcode[16]; + ssize_t bytes_written; + + if (statefile == NULL) + return; + if (snd_card_get_name(cardnumber, &str) < 0) + return; + sprintf(sexitcode, "%i", exitcode); + fp = open(statefile, O_WRONLY|O_CREAT|O_APPEND, 0644); + + bytes_written = write(fp, str, strlen(str)); + if (bytes_written != strlen(str)) { + // Handle error + } + + bytes_written = write(fp, ":", 1); + if (bytes_written != 1) { + // Handle error + } + + bytes_written = write(fp, reason, strlen(reason)); + if (bytes_written != strlen(reason)) { + // Handle error + } + + bytes_written = write(fp, ":", 1); + if (bytes_written != 1) { + // Handle error + } + + bytes_written = write(fp, sexitcode, strlen(sexitcode)); + if (bytes_written != strlen(sexitcode)) { + // Handle error + } + + bytes_written = write(fp, "\n", 1); + if (bytes_written != 1) { + // Handle error + } + + close(fp); + free(str); } static void syslog_(int prio, const char *fcn, long line,