virt: Fetch block info stats from libvirt only if needed
[collectd.git] / src / utils_config_cores.c
index 9d869b9..9465745 100644 (file)
@@ -1,7 +1,7 @@
 /**
  * collectd - src/utils_config_cores.c
  *
- * Copyright(c) 2017 Intel Corporation. All rights reserved.
+ * Copyright(c) 2018 Intel Corporation. All rights reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -163,7 +163,7 @@ static int check_core_grouping(char *out, const char *in, size_t out_size,
       ERROR(UTIL_NAME ": Missing closing bracket ] in option %s.", in);
       return -EINVAL;
     }
-    if ((end - start) >= out_size) {
+    if ((size_t)(end - start) >= out_size) {
       ERROR(UTIL_NAME ": Out buffer is too small.");
       return -EINVAL;
     }