summaryrefslogtreecommitdiff
path: root/src/lib/store/store_utils.c
blob: 18cdf64cc162bc91e843bdfb5bbbe1b827d7beed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#define _GNU_SOURCE
#include <stdio.h>

#include "store_private.h"

char *
store_utils_dupf(const char *s, ...)
{
   va_list args;
   int len;
   char *str;

   va_start(args, s);
   len = vasprintf(&str, s, args);
   va_end(args);

   if (len == -1)
     return NULL;

   return str;
}