[Fontconfig] fontconfig: Branch 'master'
Alan Coopersmith
alan.coopersmith at oracle.com
Fri Dec 7 08:00:48 PST 2012
On 12/ 7/12 02:10 AM, tagoh at kemper.freedesktop.org wrote:
> @@ -81,12 +81,15 @@ FcInitLoadConfig (void)
> "Fontconfig warning: adding <cachedir>%s</cachedir>\n",
> FC_CACHEDIR);
> prefix = FcConfigXdgCacheHome ();
> - plen = prefix ? strlen ((const char *)prefix) : 0;
> if (!prefix)
> goto bail;
> - prefix = realloc (prefix, plen + 12);
> - if (!prefix)
> + plen = prefix ? strlen ((const char *)prefix) : 0;
Since you moved that line to after the "if (!prefix) goto bail",
can't you get rid of the now redundant check for a null prefix
and simply make that:
plen = strlen((const char *)prefix):
now?
--
-Alan Coopersmith- alan.coopersmith at oracle.com
Oracle Solaris Engineering - http://blogs.oracle.com/alanc
More information about the Fontconfig
mailing list