summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/utils.c4
1 files changed, 1 insertions, 3 deletions
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
139{ 139{
140 FILE *f; 140 FILE *f;
141 141
142 f = fopen(filename, "ab"); 142 f = fopen(filename, "wb");
143 if (!f)
144 f = fopen(filename, "wb");
145 if (f) { 143 if (f) {
146 fwrite(buffer, sizeof(char), length, f); 144 fwrite(buffer, sizeof(char), length, f);
147 fclose(f); 145 fclose(f);