From: Tobias Brunner Date: Fri, 25 Nov 2011 08:48:32 +0000 (+0100) Subject: Fixed check for log groups when debug_t is unsigned. X-Git-Tag: 4.6.2~377 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b46a5cd4;p=thirdparty%2Fstrongswan.git Fixed check for log groups when debug_t is unsigned. The range and signedness of enum types is up to the compiler. --- diff --git a/src/libcharon/plugins/stroke/stroke_socket.c b/src/libcharon/plugins/stroke/stroke_socket.c index 808906f00e..c35939d4f6 100644 --- a/src/libcharon/plugins/stroke/stroke_socket.c +++ b/src/libcharon/plugins/stroke/stroke_socket.c @@ -447,7 +447,7 @@ static void stroke_loglevel(private_stroke_socket_t *this, msg->loglevel.level, msg->loglevel.type); group = enum_from_name(debug_names, msg->loglevel.type); - if (group < 0) + if ((int)group < 0) { fprintf(out, "invalid type (%s)!\n", msg->loglevel.type); return;