diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-01-25 13:42:28 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-01-25 13:42:28 -0800 |
commit | 8de6cf335b27e89866d9b443f7f44f33ace8fad9 (patch) | |
tree | 8e99b31c39f10eb3ba095081a52857aa6a9a6d2e | |
parent | afc3ec190b28caa4b470ca6617db7d9f009f586e (diff) |
Use C99 struct initializer for parseRec in GetFontNames()
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | xfontsel.c | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -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; |