summaryrefslogtreecommitdiff
path: root/utils/astcanary.c
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2008-11-02 18:52:13 +0000
committerKevin P. Fleming <kpfleming@digium.com>2008-11-02 18:52:13 +0000
commitbd4eb070f3b292617be20bda069cac47df2f7495 (patch)
treea3750d996d41e35c5df34c29533dd7d9fdcaff24 /utils/astcanary.c
parent1e6864dd9d894db29ebc350b015e9eb58226a021 (diff)
bring over all the fixes for the warnings found by gcc 4.3.x from the 1.4 branch, and add the ones needed for all the new code here too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@153616 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'utils/astcanary.c')
-rw-r--r--utils/astcanary.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/utils/astcanary.c b/utils/astcanary.c
index d4a47c423..da91e6dd2 100644
--- a/utils/astcanary.c
+++ b/utils/astcanary.c
@@ -82,7 +82,9 @@ int main(int argc, char *argv[])
if (utime(argv[1], NULL)) {
/* Recreate the file if it doesn't exist */
if ((fd = open(argv[1], O_RDWR | O_TRUNC | O_CREAT, 0777)) > -1) {
- write(fd, explanation, strlen(explanation));
+ if (write(fd, explanation, strlen(explanation)) < 0) {
+ exit(1);
+ }
close(fd);
} else {
exit(1);