utils_db_query.c: r->instances_num is unsigned
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 23 Apr 2016 08:42:52 +0000 (10:42 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 23 Apr 2016 08:42:52 +0000 (10:42 +0200)
[src/utils_db_query.c:237]: (style) Checking if unsigned variable 'instances_num' is less than zero.

src/utils_db_query.c

index 74c3a81..1f5ea7a 100644 (file)
@@ -234,7 +234,7 @@ static int udb_result_submit (udb_result_t *r, /* {{{ */
   sstrncpy (vl.type, r->type, sizeof (vl.type));
 
   /* Set vl.type_instance {{{ */
-  if (r->instances_num <= 0)
+  if (r->instances_num == 0)
   {
     if (r->instance_prefix == NULL)
       vl.type_instance[0] = 0;