summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-01-25 13:42:28 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-01-25 13:42:28 -0800
commit8de6cf335b27e89866d9b443f7f44f33ace8fad9 (patch)
tree8e99b31c39f10eb3ba095081a52857aa6a9a6d2e
parentafc3ec190b28caa4b470ca6617db7d9f009f586e (diff)
Use C99 struct initializer for parseRec in GetFontNames()
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--xfontsel.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/xfontsel.c b/xfontsel.c
index c9aa68b..9ab33d1 100644
--- a/xfontsel.c
+++ b/xfontsel.c
@@ -462,13 +462,16 @@ void GetFontNames(XtPointer closure)
SetNoFonts();
return;
}
+ count = matchingFontCount = numFonts;
numBadFonts = 0;
parseRec = XtNew(ParseRec);
- parseRec->fontNames = fontNames;
- parseRec->fonts = fonts;
- parseRec->num_fonts = count = matchingFontCount = numFonts;
- parseRec->fieldValues = fieldValues;
- parseRec->start = 0;
+ *parseRec = (ParseRec) {
+ .fontNames = fontNames,
+ .num_fonts = count,
+ .start = 0,
+ .fonts = fonts,
+ .fieldValues = fieldValues
+ };
/* this is bogus; the task should be responsible for quantizing...*/
while (count > PARSE_QUANTUM) {
ParseRec *prevRec = parseRec;