summaryrefslogtreecommitdiff
path: root/librabbitmq/amqp_api.c
diff options
context:
space:
mode:
authorAlan Antonuk <alan.antonuk@gmail.com>2013-06-18 15:16:55 -0700
committerAlan Antonuk <alan.antonuk@gmail.com>2013-06-18 15:17:50 -0700
commit7477449997792e68f5721180f10e42a31979a56c (patch)
treebd5f9f2b2f5cc63cad184f515fd0f9f50bb49504 /librabbitmq/amqp_api.c
parent1a19879ecc0c2b12ccaec062557e1e9453cc6e29 (diff)
downloadrabbitmq-c-github-ask-7477449997792e68f5721180f10e42a31979a56c.tar.gz
FIX: incorrect bit-shift in amqp_error_string2
CID 1035140
Diffstat (limited to 'librabbitmq/amqp_api.c')
-rw-r--r--librabbitmq/amqp_api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/librabbitmq/amqp_api.c b/librabbitmq/amqp_api.c
index 50666db..e6c9a0d 100644
--- a/librabbitmq/amqp_api.c
+++ b/librabbitmq/amqp_api.c
@@ -90,7 +90,7 @@ static const char *unknown_error_string = "(unknown error)";
const char *amqp_error_string2(int code)
{
const char *error_string;
- size_t category = (((-code) & ERROR_CATEGORY_MASK) >> 16);
+ size_t category = (((-code) & ERROR_CATEGORY_MASK) >> 8);
size_t error = (-code) & ERROR_MASK;
switch (category) {