aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornoname <noname@inventati.org>2014-04-28 02:41:17 +0400
committerRoberto E. Vargas Caballero <k0ga@shike2.com>2014-04-28 18:48:09 +0200
commit0e439e5624113233525266c2a104792f2c33b7e3 (patch)
tree389e337141dafe8703d2986de7fafe4b104ec6ee
parent74962bf56636e608f0ee35f2076bc6b48923119d (diff)
downloadst-0e439e5624113233525266c2a104792f2c33b7e3.tar.gz
st-0e439e5624113233525266c2a104792f2c33b7e3.tar.bz2
Simplify xunloadfonts.
-rw-r--r--st.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/st.c b/st.c
index 9079834..672c47a 100644
--- a/st.c
+++ b/st.c
@@ -2993,13 +2993,9 @@ xunloadfont(Font *f) {
void
xunloadfonts(void) {
- int i;
-
/* Free the loaded fonts in the font cache. */
- for(i = 0; i < frclen; i++) {
- XftFontClose(xw.dpy, frc[i].font);
- }
- frclen = 0;
+ while(frclen > 0)
+ XftFontClose(xw.dpy, frc[--frclen].font);
xunloadfont(&dc.font);
xunloadfont(&dc.bfont);