chiark / gitweb /
udev: no need to output OOM, if we call log_oom() anyway
authorLennart Poettering <lennart@poettering.net>
Fri, 22 Mar 2013 20:05:42 +0000 (21:05 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 22 Mar 2013 20:05:42 +0000 (21:05 +0100)
src/udev/collect/collect.c

index 6580a09..f95ee23 100644 (file)
@@ -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';