udev: no need to output OOM, if we call log_oom() anyway
This commit is contained in:
parent
ab4224458b
commit
2852ae2134
|
@ -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';
|
||||
|
||||
|
|
Loading…
Reference in New Issue