dbz
authorChristian Grothoff <christian@grothoff.org>
Fri, 11 Jun 2010 11:00:00 +0000 (11:00 +0000)
committerChristian Grothoff <christian@grothoff.org>
Fri, 11 Jun 2010 11:00:00 +0000 (11:00 +0000)
src/util/os_load.c

index a25331effe5ab9e02f5b65d7a597bf5bf134a90c..90e5c795c1ea89375c2de741701f0ca0714fb4e5 100644 (file)
@@ -603,6 +603,8 @@ GNUNET_OS_load_cpu_get (const struct GNUNET_CONFIGURATION_Handle *cfg)
       GNUNET_CONFIGURATION_get_value_number (cfg, "LOAD", "MAXCPULOAD",
                                              &maxCPULoad))
     return GNUNET_SYSERR;
+  if (maxCPULoad == 0)
+    return 100;
   return (100 * ret) / maxCPULoad;
 }