diff options
author | Daniel Mack <daniel@zonque.org> | 2015-04-02 13:43:18 +0200 |
---|---|---|
committer | Daniel Mack <daniel@zonque.org> | 2015-04-03 15:29:18 +0200 |
commit | 34a4071e998f327945993ea6e6cbcaa0292b4093 (patch) | |
tree | f5d850771de78559cfbfc396fa65aaaf5d34ca0d /src/bootchart/store.h | |
parent | 039958632036808f9baa207e72b9827fa97b7a10 (diff) |
bootchart: clean up control flow logic
Don't blindly exit() from random functions, but return a proper error
and upchain error conditions.
squash! bootchart: clean up control flow logic
When pread() returns "0", it's a read failure, so don't make the caller think
log_sample() was successful, return meaningful error code instead of 0.
Diffstat (limited to 'src/bootchart/store.h')
-rw-r--r-- | src/bootchart/store.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bootchart/store.h b/src/bootchart/store.h index f211b6f53b..8cb319275c 100644 --- a/src/bootchart/store.h +++ b/src/bootchart/store.h @@ -32,4 +32,4 @@ extern int procfd; double gettime_ns(void); void log_uptime(void); -void log_sample(int sample, struct list_sample_data **ptr); +int log_sample(int sample, struct list_sample_data **ptr); |