Browse Source

Check for incorrect return value on asprintf

master
Con Kolivas 11 years ago
parent
commit
8073936b46
  1. 2
      src/ckpool.h

2
src/ckpool.h

@ -111,7 +111,7 @@ ckpool_t *global_ckp;
int process_exit(ckpool_t *ckp, proc_instance_t *pi, int ret); int process_exit(ckpool_t *ckp, proc_instance_t *pi, int ret);
#define ASPRINTF(strp, fmt, ...) do { \ #define ASPRINTF(strp, fmt, ...) do { \
if (unlikely(asprintf(strp, fmt, ##__VA_ARGS__))) \ if (unlikely(asprintf(strp, fmt, ##__VA_ARGS__) < 0)) \
quitfrom(1, __FILE__, __func__, __LINE__, "Failed to asprintf"); \ quitfrom(1, __FILE__, __func__, __LINE__, "Failed to asprintf"); \
} while (0) } while (0)

Loading…
Cancel
Save