POSIX says:
"If ptr is a null pointer, realloc() shall be equivalent to malloc() for the
specified size."
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,