[systemd-commits] 2 commits - src/core src/udev
Lennart Poettering
lennart at kemper.freedesktop.org
Fri Mar 22 13:08:11 PDT 2013
src/core/main.c | 3 +--
src/udev/collect/collect.c | 8 +++-----
2 files changed, 4 insertions(+), 7 deletions(-)
New commits:
commit 2852ae213402930b868d366b38c717991c97785c
Author: Lennart Poettering <lennart at poettering.net>
Date: Fri Mar 22 21:05:42 2013 +0100
udev: no need to output OOM, if we call log_oom() anyway
diff --git a/src/udev/collect/collect.c b/src/udev/collect/collect.c
index 6580a09..f95ee23 100644
--- a/src/udev/collect/collect.c
+++ b/src/udev/collect/collect.c
@@ -35,8 +35,8 @@
#include "libudev-private.h"
#include "macro.h"
-#define BUFSIZE 16
-#define UDEV_ALARM_TIMEOUT 180
+#define BUFSIZE 16
+#define UDEV_ALARM_TIMEOUT 180
enum collect_state {
STATE_NONE,
@@ -140,10 +140,8 @@ static int checkout(int fd)
restart:
len = bufsize >> 1;
buf = malloc(bufsize + 1);
- if (!buf) {
- fprintf(stderr, "Out of memory.\n");
+ if (!buf)
return log_oom();
- }
memset(buf, ' ', bufsize);
buf[bufsize] = '\0';
commit ab4224458bf32d0e733f8e74b34414635389acc1
Author: Lennart Poettering <lennart at poettering.net>
Date: Fri Mar 22 15:05:51 2013 +0100
main: minor simplification
diff --git a/src/core/main.c b/src/core/main.c
index 05f0803..25f55fc 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -1573,10 +1573,9 @@ int main(int argc, char *argv[]) {
/* Make sure we leave a core dump without panicing the
* kernel. */
- if (getpid() == 1)
+ if (getpid() == 1) {
install_crash_handler();
- if (getpid() == 1) {
r = mount_cgroup_controllers(arg_join_controllers);
if (r < 0)
goto finish;
More information about the systemd-commits
mailing list