From: Lennart Poettering Date: Mon, 11 Aug 2014 16:23:47 +0000 (+0200) Subject: bootchart: it's not OK to return -1 from a main program X-Git-Tag: v216~209 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=4155f7d4be5053d5f34a26e5437fd85e1fe00fa3 bootchart: it's not OK to return -1 from a main program --- diff --git a/src/bootchart/bootchart.c b/src/bootchart/bootchart.c index c0e176da9..8ef5ad18a 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();