Fixed check for log groups when debug_t is unsigned.
authorTobias Brunner <tobias@strongswan.org>
Fri, 25 Nov 2011 08:48:32 +0000 (09:48 +0100)
committerTobias Brunner <tobias@strongswan.org>
Fri, 25 Nov 2011 08:48:32 +0000 (09:48 +0100)
The range and signedness of enum types is up to the compiler.

src/libcharon/plugins/stroke/stroke_socket.c

index 808906f..c35939d 100644 (file)
@@ -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;