Xinqi Bao's Git
projects
/
st.git
/ diff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
| inline |
side by side
(parent:
74962bf
)
Simplify xunloadfonts.
author
noname <
[email protected]
>
Sun, 27 Apr 2014 22:41:17 +0000
(
02:41
+0400)
committer
Roberto E. Vargas Caballero <
[email protected]
>
Mon, 28 Apr 2014 16:48:09 +0000
(18:48 +0200)
st.c
diff
|
blob
|
history
diff --git
a/st.c
b/st.c
index
9079834
..
672c47a
100644
(file)
--- 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);