diff options
Diffstat (limited to 'src/udev/collect/collect.c')
-rw-r--r-- | src/udev/collect/collect.c | 8 |
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'; |