summaryrefslogtreecommitdiff
path: root/src/udev
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-03-22 21:05:42 +0100
committerLennart Poettering <lennart@poettering.net>2013-03-22 21:05:42 +0100
commit2852ae213402930b868d366b38c717991c97785c (patch)
tree9ab82fd6e5e1f9e8137261c0cdf74ea513b41ca2 /src/udev
parentab4224458bf32d0e733f8e74b34414635389acc1 (diff)
udev: no need to output OOM, if we call log_oom() anyway
Diffstat (limited to 'src/udev')
-rw-r--r--src/udev/collect/collect.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/udev/collect/collect.c b/src/udev/collect/collect.c
index 6580a091e0..f95ee23b75 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';