projects
/
project
/
uci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix missing api change
[project/uci.git]
/
file.c
diff --git
a/file.c
b/file.c
index
1abe8ff
..
a58e392
100644
(file)
--- a/
file.c
+++ b/
file.c
@@
-454,7
+454,8
@@
void uci_file_commit(struct uci_context *ctx, struct uci_package **package, bool
}
rewind(f);
- ftruncate(fileno(f), 0);
+ if (ftruncate(fileno(f), 0) < 0)
+ UCI_THROW(ctx, UCI_ERR_IO);
uci_export(ctx, f, p, false);
UCI_TRAP_RESTORE(ctx);