summaryrefslogtreecommitdiff
path: root/font.c
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2023-01-14 16:44:17 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2023-01-15 09:54:02 -0800
commitdf1c5c7755441c32e26eec37d1b3d0fa0dbeceb3 (patch)
treea2b10d745c15a0c64643ef2abdefd98c58598deb /font.c
parent282857a907624ce29566b50b60687273dcd56f42 (diff)
Initialize more variables in their declarations
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'font.c')
-rw-r--r--font.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/font.c b/font.c
index 36e6776..afd4ab7 100644
--- a/font.c
+++ b/font.c
@@ -191,9 +191,8 @@ InstallFontSizes(DviWidget dw, char *x_name, Boolean *scalablep)
XFontName fontName;
unsigned int fontNameAttributes;
#endif
- DviFontSizeList *sizes;
+ DviFontSizeList *sizes = NULL;
- sizes = NULL;
#ifdef USE_XFT
*scalablep = TRUE;
#else
@@ -237,9 +236,8 @@ static DviFontList *
InstallFont(DviWidget dw, int position, const char *dvi_name,
const char *x_name)
{
- DviFontList *f;
+ DviFontList *f = LookupFontByPosition(dw, position);
- f = LookupFontByPosition(dw, position);
if (f) {
/*
* ignore gratuitous font loading
@@ -413,9 +411,8 @@ QueryFont(DviWidget dw, int position, int size)
DviCharNameMap *
QueryFontMap(DviWidget dw, int position)
{
- DviFontList *f;
+ DviFontList *f = LookupFontByPosition(dw, position);
- f = LookupFontByPosition(dw, position);
if (f)
return f->char_map;
else