summaryrefslogtreecommitdiff
path: root/src/bin/edje
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-08-22 18:21:07 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-08-22 20:14:57 +0900
commit554563cc212cb1c1814bf8ef74a04e7651c096c6 (patch)
treeb213d0cc7ac276a48fdd8cc1490ce02e080ca492 /src/bin/edje
parentceee02948475dfe4b8313a974cc927374eadc54b (diff)
fix fopen return check and error
fixes CID 1039341
Diffstat (limited to 'src/bin/edje')
-rw-r--r--src/bin/edje/edje_decc.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/bin/edje/edje_decc.c b/src/bin/edje/edje_decc.c
index 05d46b8ff6..3c1259e663 100644
--- a/src/bin/edje/edje_decc.c
+++ b/src/bin/edje/edje_decc.c
@@ -515,9 +515,13 @@ output(void)
515 exit(-1); 515 exit(-1);
516 } 516 }
517 f = fopen(out1, "wb"); 517 f = fopen(out1, "wb");
518 if (fwrite(sound_data, sound_data_size, 1, f) != 1) 518 if (f)
519 ERR("Could not write sound: %s", strerror(errno)); 519 {
520 fclose(f); 520 if (fwrite(sound_data, sound_data_size, 1, f) != 1)
521 ERR("Could not write sound: %s: %s", out1, strerror(errno));
522 fclose(f);
523 }
524 else ERR("Could not open for writing sound: %s: %s", out1, strerror(errno));
521 } 525 }
522 } 526 }
523 527