From 4d9f3abcc30bc628dd872d83233de8744136547d Mon Sep 17 00:00:00 2001 From: Alan Antonuk Date: Thu, 13 Jun 2013 13:58:58 -0700 Subject: Change amqp_error_string() to ret static strings This is an API/ABI break. --- examples/utils.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'examples') diff --git a/examples/utils.c b/examples/utils.c index 4b00470..5d4a1f9 100644 --- a/examples/utils.c +++ b/examples/utils.c @@ -59,9 +59,7 @@ void die(const char *fmt, ...) void die_on_error(int x, char const *context) { if (x < 0) { - char *errstr = amqp_error_string(-x); - fprintf(stderr, "%s: %s\n", context, errstr); - free(errstr); + fprintf(stderr, "%s: %s\n", context, amqp_error_string(x)); exit(1); } } -- cgit v1.2.1