X-Git-Url: https://git.danieliu.xyz/?p=st.git;a=blobdiff_plain;f=x.c;h=5828a3b1a42ee0fa1fd04ced06515eca05eb5651;hp=2cd76d02b8f1531f6ab78eddabc2c53016d50efd;hb=2b8333f553c14c15398e810353e192eb05938580;hpb=a8cb8e94547d7e31441d2444e8a196415e3e4c1f diff --git a/x.c b/x.c index 2cd76d0..5828a3b 100644 --- a/x.c +++ b/x.c @@ -763,7 +763,6 @@ xsetcolorname(int x, const char *name) if (!BETWEEN(x, 0, dc.collen)) return 1; - if (!xloadcolor(x, name, &ncolor)) return 1; @@ -1244,15 +1243,10 @@ xmakeglyphfontspecs(XftGlyphFontSpec *specs, const Glyph *glyphs, int len, int x fontpattern = FcFontSetMatch(0, fcsets, 1, fcpattern, &fcres); - /* - * Allocate memory for the new cache entry. - */ + /* Allocate memory for the new cache entry. */ if (frclen >= frccap) { frccap += 16; - if (!frc) - frc = xmalloc(frccap * sizeof(Fontcache)); - else - frc = xrealloc(frc, frccap * sizeof(Fontcache)); + frc = xrealloc(frc, frccap * sizeof(Fontcache)); } frc[frclen].font = XftFontOpenPattern(xw.dpy, @@ -1769,7 +1763,6 @@ kpress(XEvent *ev) ttywrite(buf, len, 1); } - void cmessage(XEvent *e) {