summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2015-05-25 17:50:46 +0000
committerVolker Lendecke <vl@samba.org>2015-05-28 11:13:09 +0200
commitabc7b2f179be2907e74f8a8da4f29c21faf9754a (patch)
treeddcae8685b0fdd79b4f568fe69931624acc9269b /source3/lib
parent32d441910568e0faa143d5e90e68bdf7099db74b (diff)
downloadsamba-abc7b2f179be2907e74f8a8da4f29c21faf9754a.tar.gz
messaging: Remove an unused variable
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/messages.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source3/lib/messages.c b/source3/lib/messages.c
index 26e5b011f5c..0297cc8201e 100644
--- a/source3/lib/messages.c
+++ b/source3/lib/messages.c
@@ -213,13 +213,12 @@ static void messaging_recv_cb(const uint8_t *msg, size_t msg_len,
{
struct messaging_context *msg_ctx = talloc_get_type_abort(
private_data, struct messaging_context);
- uint8_t hdr[MESSAGE_HDR_LENGTH];
struct server_id_buf idbuf;
struct messaging_rec rec;
int64_t fds64[MIN(num_fds, INT8_MAX)];
size_t i;
- if (msg_len < sizeof(hdr)) {
+ if (msg_len < MESSAGE_HDR_LENGTH) {
for (i=0; i < num_fds; i++) {
close(fds[i]);
}
@@ -246,8 +245,8 @@ static void messaging_recv_cb(const uint8_t *msg, size_t msg_len,
rec = (struct messaging_rec) {
.msg_version = MESSAGE_VERSION,
- .buf.data = discard_const_p(uint8_t, msg) + sizeof(hdr),
- .buf.length = msg_len - sizeof(hdr),
+ .buf.data = discard_const_p(uint8_t, msg) + MESSAGE_HDR_LENGTH,
+ .buf.length = msg_len - MESSAGE_HDR_LENGTH,
.num_fds = num_fds,
.fds = fds64,
};