HCoop
/
hcoop
/
debian
/
libapache-mod-waklog.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
22782ce
)
Fix warn_unused_result: error checking for write()
author
Jacob Welsh
<jwelsh@sinenomine.net>
Wed, 30 Oct 2013 16:31:01 +0000
(12:31 -0400)
committer
Jacob Welsh
<jwelsh@sinenomine.net>
Wed, 30 Oct 2013 16:31:48 +0000
(12:31 -0400)
mod_waklog.c
patch
|
blob
|
blame
|
history
diff --git
a/mod_waklog.c
b/mod_waklog.c
index
3525b3c
..
8cb9124
100644
(file)
--- a/
mod_waklog.c
+++ b/
mod_waklog.c
@@
-1319,7
+1319,10
@@
waklog_init_handler (apr_pool_t * p, apr_pool_t * plog,
struct sharedspace_s bob;
log_error(APLOG_MARK, APLOG_ERR, 0, s, "mod_waklog: sizing our cache file %d to %d", fd, sizeof(struct sharedspace_s) );
memset( &bob, 0, sizeof(struct sharedspace_s));
struct sharedspace_s bob;
log_error(APLOG_MARK, APLOG_ERR, 0, s, "mod_waklog: sizing our cache file %d to %d", fd, sizeof(struct sharedspace_s) );
memset( &bob, 0, sizeof(struct sharedspace_s));
- write(fd, &bob, sizeof(struct sharedspace_s));
+ if ( write(fd, &bob, sizeof(struct sharedspace_s)) != sizeof(struct sharedspace_s) ) {
+ log_error(APLOG_MARK, APLOG_ERR, 0, s, "mod_waklog: failed to write to our cache file %s (%d)", cache_file, errno );
+ exit(errno);
+ }
log_error(APLOG_MARK, APLOG_ERR, 0, s, "mod_waklog: done sizing our cache file to %d", sizeof(struct sharedspace_s) );
}
log_error(APLOG_MARK, APLOG_ERR, 0, s, "mod_waklog: done sizing our cache file to %d", sizeof(struct sharedspace_s) );
}