aboutsummaryrefslogtreecommitdiff
path: root/client-msg.c
diff options
context:
space:
mode:
authorRay Lai <ray@openbsd.org>2009-06-02 11:17:03 +0000
committerRay Lai <ray@openbsd.org>2009-06-02 11:17:03 +0000
commit49c776ea59c9af4ad5e2d1af3b93712ee6534abe (patch)
tree6943f17f57e620369284bf8ea155476466981807 /client-msg.c
parent3686645e775dafd7feb8452cc3e9d76445180237 (diff)
downloadrtmux-49c776ea59c9af4ad5e2d1af3b93712ee6534abe.tar.gz
rtmux-49c776ea59c9af4ad5e2d1af3b93712ee6534abe.tar.bz2
rtmux-49c776ea59c9af4ad5e2d1af3b93712ee6534abe.zip
Make code clearer:
- if (hdr->size > SIZE_MAX - 1) + if (hdr->size == SIZE_MAX) OK nicm@
Diffstat (limited to 'client-msg.c')
-rw-r--r--client-msg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/client-msg.c b/client-msg.c
index fd48d403..2e2a6b49 100644
--- a/client-msg.c
+++ b/client-msg.c
@@ -73,7 +73,7 @@ client_msg_dispatch(struct client_ctx *cctx, char **error)
int
client_msg_fn_error(struct hdr *hdr, struct client_ctx *cctx, char **error)
{
- if (hdr->size > SIZE_MAX - 1)
+ if (hdr->size == SIZE_MAX)
fatalx("bad MSG_ERROR size");
*error = xmalloc(hdr->size + 1);