aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-07-20 01:07:29 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-07-20 01:07:29 +0000
commitaa15f54e97e2a4cf1a4a72e344f4df546cb783c3 (patch)
treedba9653c5ab26933a0a29a0a19f754f14e96fe89
parentb5a2f16c845f9c52d31aa554065851819fe6c85d (diff)
parent48771eb6d2805e71c0656128778907486334b6a6 (diff)
downloadtinyalsa_new-android12L-gsi.tar.gz
Change-Id: I4c11427ff93a3c39b906a6784cc71cc1f4edc2ca
-rw-r--r--src/pcm_hw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pcm_hw.c b/src/pcm_hw.c
index 4792895..e5588a0 100644
--- a/src/pcm_hw.c
+++ b/src/pcm_hw.c
@@ -50,7 +50,7 @@ struct pcm_hw_data {
/** Device number for the pcm device */
unsigned int device;
/** File descriptor to the pcm device file node */
- unsigned int fd;
+ int fd;
/** Pointer to the pcm node from snd card definiton */
struct snd_node *node;
};
@@ -59,7 +59,7 @@ static void pcm_hw_close(void *data)
{
struct pcm_hw_data *hw_data = data;
- if (hw_data->fd > 0)
+ if (hw_data->fd >= 0)
close(hw_data->fd);
free(hw_data);