Commit 3fa97c17 authored by Janusz Dziemidowicz's avatar Janusz Dziemidowicz Committed by npzacs
Browse files

Fix parsing of first title entry

f888ebf5 caused first title entry from KEYDB.cfg to be ignored as it is
trying to add entries to uninitialized list, and just prints following
warning:
Error: No title list passed as parameter.
Fix it by moving initialization to proper place.
parent e3def00a
......@@ -266,23 +266,7 @@ host_key_point
title_entry
: newline_list disc_info entry_list NEWLINE
{
if (!cf->list) {
celist = cf->list = new_title_entry_list();
} else {
celist->next = new_title_entry_list();
celist = celist->next;
}
}
| disc_info entry_list NEWLINE
{
if (!cf->list) {
celist = cf->list = new_title_entry_list();
} else {
celist->next = new_title_entry_list();
celist = celist->next;
}
}
;
newline_list
......@@ -293,6 +277,12 @@ newline_list
disc_info
: discid PUNCT_EQUALS_SIGN disc_title
{
if (!cf->list) {
celist = cf->list = new_title_entry_list();
} else {
celist->next = new_title_entry_list();
celist = celist->next;
}
add_entry(celist, ENTRY_TYPE_DISCID, $1);
add_entry(celist, ENTRY_TYPE_TITLE, $3);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment