diff options
Diffstat (limited to 'xorg-server/dix/dixfonts.c')
-rw-r--r-- | xorg-server/dix/dixfonts.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/xorg-server/dix/dixfonts.c b/xorg-server/dix/dixfonts.c index 431b3ef6f..f46902419 100644 --- a/xorg-server/dix/dixfonts.c +++ b/xorg-server/dix/dixfonts.c @@ -484,7 +484,7 @@ CloseFont(pointer value, XID fid) FontPtr pfont = (FontPtr)value;
if (pfont == NullFont)
- return (Success);
+ return Success;
if (--pfont->refcnt == 0) {
if (patternCache)
RemoveCachedFontPattern (patternCache, pfont);
@@ -506,7 +506,7 @@ CloseFont(pointer value, XID fid) (*fpe_functions[fpe->type].close_font) (fpe, pfont);
FreeFPE(fpe);
}
- return (Success);
+ return Success;
}
@@ -679,7 +679,7 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c) return TRUE;
}
if (err == FontNameAlias) {
- if (resolved) free(resolved);
+ free(resolved);
resolved = malloc(resolvedlen + 1);
if (resolved)
memmove(resolved, tmpname, resolvedlen + 1);
@@ -733,8 +733,7 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c) {
c->saved = c->current;
c->haveSaved = TRUE;
- if (c->savedName)
- free(c->savedName);
+ free(c->savedName);
c->savedName = malloc(namelen + 1);
if (c->savedName)
memmove(c->savedName, name, namelen + 1);
@@ -830,10 +829,10 @@ bail: for (i = 0; i < c->num_fpes; i++)
FreeFPE(c->fpe_list[i]);
free(c->fpe_list);
- if (c->savedName) free(c->savedName);
+ free(c->savedName);
FreeFontNames(names);
free(c);
- if (resolved) free(resolved);
+ free(resolved);
return TRUE;
}
@@ -996,8 +995,7 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c) c->saved = c->current;
c->haveSaved = TRUE;
c->savedNumFonts = numFonts;
- if (c->savedName)
- free(c->savedName);
+ free(c->savedName);
c->savedName = malloc(namelen + 1);
if (c->savedName)
memmove(c->savedName, name, namelen + 1);
@@ -1095,7 +1093,7 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c) }
finish:
length = sizeof(xListFontsWithInfoReply);
- bzero((char *) &finalReply, sizeof(xListFontsWithInfoReply));
+ memset((char *) &finalReply, 0, sizeof(xListFontsWithInfoReply));
finalReply.type = X_Reply;
finalReply.sequenceNumber = client->sequence;
finalReply.length = bytes_to_int32(sizeof(xListFontsWithInfoReply)
@@ -1108,7 +1106,7 @@ bail: FreeFPE(c->fpe_list[i]);
free(c->reply);
free(c->fpe_list);
- if (c->savedName) free(c->savedName);
+ free(c->savedName);
free(c);
return TRUE;
}
|