From 71ac281579c8b8b384cfc09d8627b549b1854fcd Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 18 Sep 2008 04:29:53 -0700 Subject: Move away from fprintf() when writing DB/state_file I have serious trust issues when using stdio to write to the FS. So it's best to clean this code out so I can start figuring out what's wrong with Rasi's box not updating... None of these writes take place in a performance-critical setting anyways... --- src/volume.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/volume.c') diff --git a/src/volume.c b/src/volume.c index 428c3b8a1..6d8411165 100644 --- a/src/volume.c +++ b/src/volume.c @@ -23,6 +23,7 @@ #include "utils.h" #include "os_compat.h" #include "outputBuffer.h" +#include "myfprintf.h" #include "../config.h" @@ -532,9 +533,9 @@ void read_sw_volume_state(FILE *fp) #undef bufsize } -void save_sw_volume_state(FILE *fp) +void save_sw_volume_state(int fd) { if (volume_mixerType == VOLUME_MIXER_TYPE_SOFTWARE) - fprintf(fp, SW_VOLUME_STATE "%d\n", volume_softwareSet); + fdprintf(fd, SW_VOLUME_STATE "%d\n", volume_softwareSet); } -- cgit v1.2.3