summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-08-11 18:23:47 +0200
committerLennart Poettering <lennart@poettering.net>2014-08-11 18:23:47 +0200
commit4155f7d4be5053d5f34a26e5437fd85e1fe00fa3 (patch)
treed7e9783fa8381581bd7514f6c59c07fcca473fdb
parent96ddbf819a5675dba23ffadc35099462fdb2579f (diff)
bootchart: it's not OK to return -1 from a main program
-rw-r--r--src/bootchart/bootchart.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bootchart/bootchart.c b/src/bootchart/bootchart.c
index c0e176da9b..8ef5ad18a6 100644
--- a/src/bootchart/bootchart.c
+++ b/src/bootchart/bootchart.c
@@ -380,8 +380,8 @@ int main(int argc, char *argv[]) {
sampledata = new0(struct list_sample_data, 1);
if (sampledata == NULL) {
- log_error("Failed to allocate memory for a node: %m");
- return -1;
+ log_oom();
+ return EXIT_FAILURE;
}
sampledata->sampletime = gettime_ns();