aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTaylor Holberton <tay10r@protonmail.com>2020-04-10 07:23:55 -0400
committerGitHub <noreply@github.com>2020-04-10 07:23:55 -0400
commite05e532312837c24cf0a2d82104efaa7e8b49515 (patch)
tree6a6499ea573003007c90bf75a87ba6151cbc27c2 /src
parent5eff8665c28406df8ec0067ec3f4b402d53169ec (diff)
parent8fca97e39aa3fd16cb279c175dd2baf5406dcc67 (diff)
Merge pull request #149 from lkundrak/lr/-errno
pcm: do not negate errno
Diffstat (limited to 'src')
-rw-r--r--src/pcm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pcm.c b/src/pcm.c
index c28e098..46fc3a7 100644
--- a/src/pcm.c
+++ b/src/pcm.c
@@ -394,7 +394,7 @@ int pcm_set_config(struct pcm *pcm, const struct pcm_config *config)
if (pcm->ops->ioctl(pcm->data, SNDRV_PCM_IOCTL_HW_PARAMS, &params)) {
int errno_copy = errno;
- oops(pcm, -errno, "cannot set hw params");
+ oops(pcm, errno, "cannot set hw params");
return -errno_copy;
}
@@ -408,7 +408,7 @@ int pcm_set_config(struct pcm *pcm, const struct pcm_config *config)
PROT_READ | PROT_WRITE, MAP_FILE | MAP_SHARED, pcm->fd, 0);
if (pcm->mmap_buffer == MAP_FAILED) {
int errno_copy = errno;
- oops(pcm, -errno, "failed to mmap buffer %d bytes\n",
+ oops(pcm, errno, "failed to mmap buffer %d bytes\n",
pcm_frames_to_bytes(pcm, pcm->buffer_size));
return -errno_copy;
}
@@ -451,7 +451,7 @@ int pcm_set_config(struct pcm *pcm, const struct pcm_config *config)
if (pcm->ops->ioctl(pcm->data, SNDRV_PCM_IOCTL_SW_PARAMS, &sparams)) {
int errno_copy = errno;
- oops(pcm, -errno, "cannot set sw params");
+ oops(pcm, errno, "cannot set sw params");
return -errno_copy;
}