From 78be7c99f552ad5f4c6f0c85158a1131aeaac580 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Mon, 23 Jan 2006 22:19:13 +0000 Subject: [PATCH] 2006-01-23 Samuel Thibault * console.c (main): Check CONS instead of MALLOC. --- console/ChangeLog | 2 ++ console/console.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/console/ChangeLog b/console/ChangeLog index a67022b25..4a7ad7138 100644 --- a/console/ChangeLog +++ b/console/ChangeLog @@ -1,5 +1,7 @@ 2006-01-23 Samuel Thibault + * console.c (main): Check CONS instead of MALLOC. + * input.c (input_create): Fix arguments order of iconv_open() call. diff --git a/console/console.c b/console/console.c index 3c8acb81c..118787eb0 100644 --- a/console/console.c +++ b/console/console.c @@ -1999,7 +1999,7 @@ main (int argc, char **argv) struct netnode root_nn = { vcons: 0 }; cons = malloc (sizeof (struct cons)); - if (!malloc) + if (!cons) error (1, ENOMEM, "Cannot create console structure"); mutex_init (&cons->lock); cons->encoding = NULL;