udev: no need to output OOM, if we call log_oom() anyway

This commit is contained in:
Lennart Poettering 2013-03-22 21:05:42 +01:00
parent ab4224458b
commit 2852ae2134
1 changed files with 3 additions and 5 deletions

View 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';