@@ -199,7 +199,7 @@ static void parser_add_user(struct profile_parser *parser)
199
199
200
200
static void profile_parse_line_root (struct profile_parser * parser , char * line )
201
201
{
202
- const char * key , * value , * nameline , * error ;
202
+ const char * key , * value , * error ;
203
203
204
204
if (try_parse_keyvalue (line , & key , & value )) {
205
205
if (strcmp (key , "total_user_count" ) == 0 ) {
@@ -243,8 +243,7 @@ static void profile_parse_line_root(struct profile_parser *parser, char *line)
243
243
i_fatal ("Unknown section at line %u: %s" , parser -> linenum , key );
244
244
245
245
if (value [0 ] != '\0' ) {
246
- nameline = t_strdup_printf ("name=%s" , value );
247
- if (settings_parse_line (parser -> cur_parser , nameline ) != 1 )
246
+ if (settings_parse_keyvalue (parser -> cur_parser , "name" , value ) != 1 )
248
247
i_unreached ();
249
248
}
250
249
}
@@ -274,7 +273,7 @@ static void parse_count(struct profile_parser *parser, const char *value,
274
273
static void
275
274
profile_parse_line_section (struct profile_parser * parser , char * line )
276
275
{
277
- const char * key , * value , * newline ;
276
+ const char * key , * value ;
278
277
int ret ;
279
278
280
279
if (strcmp (line , "}" ) == 0 ) {
@@ -285,10 +284,9 @@ profile_parse_line_section(struct profile_parser *parser, char *line)
285
284
if (!try_parse_keyvalue (line , & key , & value ))
286
285
i_fatal ("Invalid data at line %u: %s" , parser -> linenum , line );
287
286
288
- newline = t_strdup_printf ("%s=%s" , key , value );
289
287
if (strcmp (key , "count" ) == 0 )
290
288
parse_count (parser , value , & parser -> cur_count );
291
- else if ((ret = settings_parse_line (parser -> cur_parser , newline )) < 0 ) {
289
+ else if ((ret = settings_parse_keyvalue (parser -> cur_parser , key , value )) < 0 ) {
292
290
i_fatal ("Invalid value for setting '%s' at line %u: %s" ,
293
291
key , parser -> linenum , value );
294
292
} else if (ret == 0 ) {
0 commit comments