]> code.delx.au - pulseaudio/blobdiff - src/pulsecore/sound-file.c
Remove unnecessary #includes
[pulseaudio] / src / pulsecore / sound-file.c
index 2d9b76ad6e4597deb836e78f3837c96f28b2efa0..3db0981fa07bfbd00bcc18be80439d7b7ae069a7 100644 (file)
@@ -23,7 +23,6 @@
 #include <config.h>
 #endif
 
-#include <string.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <errno.h>
@@ -62,11 +61,7 @@ int pa_sound_file_load(
 
     pa_memchunk_reset(chunk);
 
-    if ((fd = open(fname, O_RDONLY
-#ifdef O_NOCTTY
-                   |O_NOCTTY
-#endif
-                   )) < 0) {
+    if ((fd = pa_open_cloexec(fname, O_RDONLY, 0)) < 0) {
         pa_log("Failed to open file %s: %s", fname, pa_cstrerror(errno));
         goto finish;
     }