summaryrefslogtreecommitdiff
path: root/x11-plugins/wmmemfree/files/wmmemfree-0.7-fix-crash-when-there-is-no-swap.patch
diff options
context:
space:
mode:
Diffstat (limited to 'x11-plugins/wmmemfree/files/wmmemfree-0.7-fix-crash-when-there-is-no-swap.patch')
-rw-r--r--x11-plugins/wmmemfree/files/wmmemfree-0.7-fix-crash-when-there-is-no-swap.patch18
1 files changed, 0 insertions, 18 deletions
diff --git a/x11-plugins/wmmemfree/files/wmmemfree-0.7-fix-crash-when-there-is-no-swap.patch b/x11-plugins/wmmemfree/files/wmmemfree-0.7-fix-crash-when-there-is-no-swap.patch
deleted file mode 100644
index d062fd9ee09b..000000000000
--- a/x11-plugins/wmmemfree/files/wmmemfree-0.7-fix-crash-when-there-is-no-swap.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- wmmemfree-0.7/draw.c 2003-03-21 21:56:25.000000000 +0100
-+++ wmmemfree-0.7/draw.c 2008-02-16 10:02:51.000000000 +0100
-@@ -44,13 +44,13 @@
- XCopyArea(display, on, buffer, gc, 0, 0, 2, 11, 7 + n * 2, 27);
- else
- XCopyArea(display, off, buffer, gc, 0, 0, 2, 11, 7 + n * 2, 27);
-- if(n < (swp * 25 / swp_total))
-+ if(n < ((swp_total) ? (swp * 25 / swp_total) : 0))
- XCopyArea(display, on, buffer, gc, 0, 0, 2, 11, 7 + n * 2, 47);
- else
- XCopyArea(display, off, buffer, gc, 0, 0, 2, 11, 7 + n * 2, 47);
- }
- mem_percent = mem * 100 / mem_total;
-- swp_percent = swp * 100 / swp_total;
-+ swp_percent = (swp_total) ? swp * 100 / swp_total : 0;
- if(mem_percent == 100)
- XCopyArea(display, numbers, buffer, gc, 5, 0, 5, 6, 33, 20);
- else