util: remove useless asprintf macro

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-04-26 20:22:44 +02:00
parent 0b61a38c7a
commit 324387bfed
1 changed files with 0 additions and 7 deletions

View File

@ -23,7 +23,6 @@
#ifndef AWESOME_COMMON_UTIL_H #ifndef AWESOME_COMMON_UTIL_H
#define AWESOME_COMMON_UTIL_H #define AWESOME_COMMON_UTIL_H
/* asprintf */
#define _GNU_SOURCE #define _GNU_SOURCE
#include <string.h> #include <string.h>
@ -339,11 +338,5 @@ void *name_func_lookup(const char *, size_t, const name_func_link_t *);
const char * name_func_rlookup(void *, const name_func_link_t *); const char * name_func_rlookup(void *, const name_func_link_t *);
void a_exec(const char *); void a_exec(const char *);
#define a_asprintf(strp, fmt, ...) \
do { \
if(asprintf(strp, fmt, ## __VA_ARGS__) < 0) \
abort(); \
} while(0)
#endif #endif
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80 // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80