summaryrefslogtreecommitdiff
path: root/x11-fm/endeavour/files/patch-ab
diff options
context:
space:
mode:
Diffstat (limited to 'x11-fm/endeavour/files/patch-ab')
-rw-r--r--x11-fm/endeavour/files/patch-ab14
1 files changed, 14 insertions, 0 deletions
diff --git a/x11-fm/endeavour/files/patch-ab b/x11-fm/endeavour/files/patch-ab
new file mode 100644
index 000000000000..c51ff121ff08
--- /dev/null
+++ b/x11-fm/endeavour/files/patch-ab
@@ -0,0 +1,14 @@
+--- devrec.c.orig Thu Oct 7 01:19:47 1999
++++ devrec.c Thu Oct 7 13:52:49 1999
+@@ -389,8 +389,9 @@
+ capacity_available = atol(strv[3]);
+
+ /* Calculate capacity percent. */
+- capacity_percent = (double)capacity_used /
+- (double)capacity_total * 100;
++ if ((double)capacity_total)
++ capacity_percent = (double)capacity_used /
++ (double)capacity_total * 100;
+
+ strncpy(path, strv[5], PATH_MAX + NAME_MAX);
+ path[PATH_MAX + NAME_MAX - 1] = '\0';