From e53fcd1dd30f7dcd3c496ef25c3dea197e928ce7 Mon Sep 17 00:00:00 2001
From: Nikias Bassen
Date: Thu, 19 Sep 2013 05:22:48 +0200
Subject: utils: make buffer_write_to_filename overwrite instead of append to
 existing files

---
 common/utils.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

(limited to 'common')

diff --git a/common/utils.c b/common/utils.c
index 5248c2c..1b207ea 100644
--- a/common/utils.c
+++ b/common/utils.c
@@ -139,9 +139,7 @@ void buffer_write_to_filename(const char *filename, const char *buffer, uint64_t
 {
 	FILE *f;
 
-	f = fopen(filename, "ab");
-	if (!f)
-		f = fopen(filename, "wb");
+	f = fopen(filename, "wb");
 	if (f) {
 		fwrite(buffer, sizeof(char), length, f);
 		fclose(f);
-- 
cgit v1.1-32-gdbae