|
@@ -288,22 +288,20 @@ static struct settings * autovivify_child_settings ( struct settings *parent,
|
288
|
288
|
}
|
289
|
289
|
|
290
|
290
|
/**
|
291
|
|
- * Return settings block name (for debug only)
|
|
291
|
+ * Return settings block name
|
292
|
292
|
*
|
293
|
293
|
* @v settings Settings block
|
294
|
294
|
* @ret name Settings block name
|
295
|
295
|
*/
|
296
|
|
-static const char * settings_name ( struct settings *settings ) {
|
297
|
|
- static char buf[64];
|
|
296
|
+const char * settings_name ( struct settings *settings ) {
|
|
297
|
+ static char buf[16];
|
298
|
298
|
char tmp[ sizeof ( buf ) ];
|
299
|
|
- int count;
|
300
|
299
|
|
301
|
|
- for ( count = 0 ; settings ; settings = settings->parent ) {
|
|
300
|
+ for ( buf[2] = buf[0] = 0 ; settings ; settings = settings->parent ) {
|
302
|
301
|
memcpy ( tmp, buf, sizeof ( tmp ) );
|
303
|
|
- snprintf ( buf, sizeof ( buf ), "%s%c%s", settings->name,
|
304
|
|
- ( count++ ? '.' : '\0' ), tmp );
|
|
302
|
+ snprintf ( buf, sizeof ( buf ), ".%s%s", settings->name, tmp );
|
305
|
303
|
}
|
306
|
|
- return ( buf + 1 );
|
|
304
|
+ return ( buf + 2 );
|
307
|
305
|
}
|
308
|
306
|
|
309
|
307
|
/**
|