X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=x.c;h=5828a3b1a42ee0fa1fd04ced06515eca05eb5651;hb=add0211522737b79dad990ccd65c8af63b5cc1dd;hp=aa86b31ec860664bba40ebcca7c1d7a7cfd13854;hpb=4e0135afeca43f5affe13d7269cb98e7ac526074;p=st.git diff --git a/x.c b/x.c index aa86b31..5828a3b 100644 --- a/x.c +++ b/x.c @@ -1243,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,