@@ -505,7 +505,10 @@ int conf_write(const char *name)
while (1) {
l = strcspn(str, "\"\\");
if (l) {
- fwrite(str, l, 1, out);
+ if (fwrite(str, l, 1, out) != 1) {
+ fprintf(stderr, "write str failed\n");
+ return 1;
+ }
str += l;
}
if (!*str)
@@ -756,8 +759,14 @@ int conf_write_autoconf(void)
while (1) {
l = strcspn(str, "\"\\");
if (l) {
- fwrite(str, l, 1, out);
- fwrite(str, l, 1, out_h);
+ if (fwrite(str, l, 1, out) != 1) {
+ fprintf(stderr, "write str failed\n");
+ return 1;
+ }
+ if (fwrite(str, l, 1, out_h) != 1) {
+ fprintf(stderr, "write str failed\n");
+ return 1;
+ }
str += l;
}
if (!*str)