From 9eb80c522892e425424da90d7c1417b6594f319e Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Tue, 5 Nov 2013 11:08:19 +0100 Subject: Use array_size makro in error_status param length check Just the literal 6 in code is abit hard to unterstand. --- src/pjctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pjctl.c b/src/pjctl.c index 8e6b1e5..1b0d295 100644 --- a/src/pjctl.c +++ b/src/pjctl.c @@ -694,7 +694,7 @@ error_status_response(struct pjctl *pjctl, struct queue_command *cmd, if (handle_pjlink_error(param) < 0) return; - if (strlen(param) != 6) { + if (strlen(param) != ARRAY_SIZE(flags)) { fprintf(stderr, "invalid message received\n"); return; } -- cgit