+2021-01-08 Timm Bäder <tbaeder@redhat.com>
+
+ * arlib-argp.c (help_filter): Lift text_for_default function to...
+ (text_for_default): ... here. New file scope function taking text
+ as argument.
+
2021-01-08 Timm Bäder <tbaeder@redhat.com>
* addr2line.c (handle_address): Move show_note and show_int up to
}
static char *
-help_filter (int key, const char *text, void *input __attribute__ ((unused)))
+text_for_default (const char *text)
{
- inline char *text_for_default (void)
- {
- char *new_text;
- if (unlikely (asprintf (&new_text, _("%s (default)"), text) < 0))
- return (char *) text;
- return new_text;
- }
+ char *new_text;
+ if (unlikely (asprintf (&new_text, _("%s (default)"), text) < 0))
+ return (char *) text;
+ return new_text;
+}
+static char *
+help_filter (int key, const char *text, void *input __attribute__ ((unused)))
+{
switch (key)
{
case 'D':
if (DEFAULT_AR_DETERMINISTIC)
- return text_for_default ();
+ return text_for_default (text);
break;
case 'U':
if (! DEFAULT_AR_DETERMINISTIC)
- return text_for_default ();
+ return text_for_default (text);
break;
}