summaryrefslogtreecommitdiff
path: root/src/bootchart/bootchart.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-02-13 14:45:51 +0100
committerLennart Poettering <lennart@poettering.net>2014-02-13 14:45:51 +0100
commit955d98c9c1104d469c2989dbfb58f58ee6fe9bdc (patch)
tree6964487e69bfefbbb08b0de140c67c6f2a00d791 /src/bootchart/bootchart.c
parent7e2270246b0906675c8f34bc278b1608b969e65c (diff)
everywhere: make use of new0() and macro() macros, and stop using perror()
Diffstat (limited to 'src/bootchart/bootchart.c')
-rw-r--r--src/bootchart/bootchart.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bootchart/bootchart.c b/src/bootchart/bootchart.c
index 27fd505929..630f9c5d15 100644
--- a/src/bootchart/bootchart.c
+++ b/src/bootchart/bootchart.c
@@ -318,10 +318,10 @@ int main(int argc, char *argv[]) {
(void) setrlimit(RLIMIT_NOFILE, &rlim);
/* start with empty ps LL */
- ps_first = calloc(1, sizeof(struct ps_struct));
+ ps_first = new0(struct ps_struct, 1);
if (!ps_first) {
- perror("calloc(ps_struct)");
- exit(EXIT_FAILURE);
+ log_oom();
+ return EXIT_FAILURE;
}
/* handle TERM/INT nicely */
@@ -397,8 +397,8 @@ int main(int argc, char *argv[]) {
/* caught signal, probably HUP! */
break;
}
- perror("nanosleep()");
- exit (EXIT_FAILURE);
+ log_error("nanosleep() failed: %m");
+ exit(EXIT_FAILURE);
}
} else {
overrun++;