mirror of
https://github.com/alsa-project/alsa-utils
synced 2024-12-22 18:16:31 +01:00
Update utils.c spaces
This commit is contained in:
parent
71b5ee6aee
commit
62b4073ccd
1 changed files with 44 additions and 44 deletions
|
@ -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)
|
void initfailed(int cardnumber, const char *reason, int exitcode)
|
||||||
{
|
{
|
||||||
int fp;
|
int fp;
|
||||||
char *str;
|
char *str;
|
||||||
char sexitcode[16];
|
char sexitcode[16];
|
||||||
ssize_t bytes_written;
|
ssize_t bytes_written;
|
||||||
|
|
||||||
if (statefile == NULL)
|
if (statefile == NULL)
|
||||||
return;
|
return;
|
||||||
if (snd_card_get_name(cardnumber, &str) < 0)
|
if (snd_card_get_name(cardnumber, &str) < 0)
|
||||||
return;
|
return;
|
||||||
sprintf(sexitcode, "%i", exitcode);
|
sprintf(sexitcode, "%i", exitcode);
|
||||||
fp = open(statefile, O_WRONLY|O_CREAT|O_APPEND, 0644);
|
fp = open(statefile, O_WRONLY|O_CREAT|O_APPEND, 0644);
|
||||||
|
|
||||||
bytes_written = write(fp, str, strlen(str));
|
bytes_written = write(fp, str, strlen(str));
|
||||||
if (bytes_written != strlen(str)) {
|
if (bytes_written != strlen(str)) {
|
||||||
// Handle error
|
// Handle error
|
||||||
}
|
}
|
||||||
|
|
||||||
bytes_written = write(fp, ":", 1);
|
bytes_written = write(fp, ":", 1);
|
||||||
if (bytes_written != 1) {
|
if (bytes_written != 1) {
|
||||||
// Handle error
|
// Handle error
|
||||||
}
|
}
|
||||||
|
|
||||||
bytes_written = write(fp, reason, strlen(reason));
|
bytes_written = write(fp, reason, strlen(reason));
|
||||||
if (bytes_written != strlen(reason)) {
|
if (bytes_written != strlen(reason)) {
|
||||||
// Handle error
|
// Handle error
|
||||||
}
|
}
|
||||||
|
|
||||||
bytes_written = write(fp, ":", 1);
|
bytes_written = write(fp, ":", 1);
|
||||||
if (bytes_written != 1) {
|
if (bytes_written != 1) {
|
||||||
// Handle error
|
// Handle error
|
||||||
}
|
}
|
||||||
|
|
||||||
bytes_written = write(fp, sexitcode, strlen(sexitcode));
|
bytes_written = write(fp, sexitcode, strlen(sexitcode));
|
||||||
if (bytes_written != strlen(sexitcode)) {
|
if (bytes_written != strlen(sexitcode)) {
|
||||||
// Handle error
|
// Handle error
|
||||||
}
|
}
|
||||||
|
|
||||||
bytes_written = write(fp, "\n", 1);
|
bytes_written = write(fp, "\n", 1);
|
||||||
if (bytes_written != 1) {
|
if (bytes_written != 1) {
|
||||||
// Handle error
|
// Handle error
|
||||||
}
|
}
|
||||||
|
|
||||||
close(fp);
|
close(fp);
|
||||||
free(str);
|
free(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void syslog_(int prio, const char *fcn, long line,
|
static void syslog_(int prio, const char *fcn, long line,
|
||||||
|
|
Loading…
Reference in a new issue