From: bodea Date: Thu, 28 Oct 2004 03:26:41 +0000 (+0000) Subject: shared_malloc returns NULL on failure X-Git-Tag: release_2_0_3~24 X-Git-Url: http://git.sameswireless.fr/l2tpns.git/commitdiff_plain/e2f5928188e0884e7075663b044f2759b0842738?hp=5386106aa5718d0792261a001cedb388f864bbfd shared_malloc returns NULL on failure --- diff --git a/tbf.c b/tbf.c index 117ebd8..e5d7e99 100644 --- a/tbf.c +++ b/tbf.c @@ -1,6 +1,6 @@ // L2TPNS: token bucket filters -char const *cvs_id_tbf = "$Id: tbf.c,v 1.6 2004/09/02 04:18:07 fred_nerk Exp $"; +char const *cvs_id_tbf = "$Id: tbf.c,v 1.7 2004/10/28 03:26:41 bodea Exp $"; #define _GNU_SOURCE @@ -21,7 +21,7 @@ static void tbf_run_queue(int tbf_id); void init_tbf(void) { - if ((filter_list = shared_malloc(sizeof(*filter_list) * MAXTBFS)) == MAP_FAILED) + if (!(filter_list = shared_malloc(sizeof(*filter_list) * MAXTBFS))) return; filter_list_size = MAXTBFS;