From 64689a9083fd11a1e482cc86c0417183cdc76ece Mon Sep 17 00:00:00 2001 From: Markus Teich Date: Fri, 2 Dec 2016 12:53:19 +0100 Subject: [PATCH] add error log msg --- brandt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/brandt.c b/brandt.c index d023b83..f5bb4fa 100644 --- a/brandt.c +++ b/brandt.c @@ -200,8 +200,13 @@ BRANDT_new (BRANDT_CbResult result, struct BRANDT_DescrP *desc; struct GNUNET_TIME_Relative until_start; - if (0 == num_prices) + if (!(0 < num_prices)) + { + GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, + "libbrandt", + "num_prices must be > 0\n"); return NULL; + } desc = GNUNET_new (struct BRANDT_DescrP); desc->time_start = GNUNET_TIME_absolute_hton (time_start);