bug #40142 Floating point exception on Ubuntu 10.04
* avr.c: avoid division by zero in report_progress(), eg. when writing an empty eeprom file were total becomes 0 git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1340 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
parent
58f509cb54
commit
5f8a599ce5
|
@ -1,3 +1,9 @@
|
||||||
|
2014-11-14 Rene Liebscher <R.Liebscher@gmx.de>
|
||||||
|
|
||||||
|
bug #40142 Floating point exception on Ubuntu 10.04
|
||||||
|
* avr.c: avoid division by zero in report_progress(), eg. when
|
||||||
|
writing an empty eeprom file were total becomes 0
|
||||||
|
|
||||||
2014-11-13 Rene Liebscher <R.Liebscher@gmx.de>
|
2014-11-13 Rene Liebscher <R.Liebscher@gmx.de>
|
||||||
|
|
||||||
patch #8504 buspirate: Also support "cpufreq" extended parameter
|
patch #8504 buspirate: Also support "cpufreq" extended parameter
|
||||||
|
|
2
avr.c
2
avr.c
|
@ -1214,7 +1214,7 @@ void report_progress (int completed, int total, char *hdr)
|
||||||
{
|
{
|
||||||
static int last = 0;
|
static int last = 0;
|
||||||
static double start_time;
|
static double start_time;
|
||||||
int percent = (completed * 100) / total;
|
int percent = (total > 0) ? ((completed * 100) / total) : 100;
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
double t;
|
double t;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue