struct lsfd_counter **counters; /* NULL terminated array. */
};
-static void xstrappend(char **a, const char *b);
-static void xstrputc(char **a, char c);
-
static int column_name_to_id(const char *name, size_t namesz)
{
size_t i;
exit(EXIT_SUCCESS);
}
-static void xstrappend(char **a, const char *b)
-{
- if (strappend(a, b) < 0)
- err(EXIT_FAILURE, _("failed to allocate memory for string"));
-}
-
-static void xstrputc(char **a, char c)
-{
- char b[] = {c, '\0'};
- xstrappend(a, b);
-}
-
static void append_filter_expr(char **a, const char *b, bool and)
{
if (*a == NULL) {
#include <inttypes.h>
#include "list.h"
+#include "strutils.h"
/*
* column IDs
const char *get_miscdev(unsigned long minor);
const char *get_nodev_filesystem(unsigned long minor);
+static inline void xstrappend(char **a, const char *b)
+{
+ if (strappend(a, b) < 0)
+ err(XALLOC_EXIT_CODE, _("failed to allocate memory for string"));
+}
+
+static inline void xstrputc(char **a, char c)
+{
+ char b[] = {c, '\0'};
+ xstrappend(a, b);
+}
+
#endif /* UTIL_LINUX_LSFD_H */