X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=x.c;h=5828a3b1a42ee0fa1fd04ced06515eca05eb5651;hb=ed68fe7dce2b21b4e0e595b99d47790e76812cb7;hp=2cd76d02b8f1531f6ab78eddabc2c53016d50efd;hpb=a8cb8e94547d7e31441d2444e8a196415e3e4c1f;p=st.git 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) {