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/audio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/audio.c') diff --git a/src/audio.c b/src/audio.c index d4447bc7e..5eacf7422 100644 --- a/src/audio.c +++ b/src/audio.c @@ -461,13 +461,13 @@ void printAudioDevices(int fd) } } -void saveAudioDevicesState(FILE *fp) +void saveAudioDevicesState(int fd) { unsigned int i; assert(audioOutputArraySize != 0); for (i = 0; i < audioOutputArraySize; i++) { - fprintf(fp, AUDIO_DEVICE_STATE "%d:%s\n", + fdprintf(fd, AUDIO_DEVICE_STATE "%d:%s\n", audioDeviceStates[i] & 0x01, audioOutputArray[i].name); } -- cgit v1.2.3