CVS commit by staikos: fix compiler warning CVS_SILENT M +5 -2 portable.cpp 1.38 --- kdeutils/klaptopdaemon/portable.cpp #1.37:1.38 @@ -201,5 +201,5 @@ pmu_read(apm_info *ap) bf.close(); } - ap->battery_percentage = 100*float(float(charge)/float(maxcharge)); + ap->battery_percentage = int(100.0*float(float(charge)/float(maxcharge))); ap->battery_time = timerem; @@ -476,4 +476,7 @@ has_apm() apm_no_time = apmx.battery_time < 0; } + + if (val == 0) + val = have_pmu(); return(val); }