Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 064bcc07 authored by Steve French's avatar Steve French
Browse files

Fix coverity warning



Coverity reports a warning for referencing the beginning of the
SMB2/SMB3 frame using the ProtocolId field as an array. Although
it works the same either way, this patch should quiet the warning
and might be a little clearer.

Reported by Coverity (CID 741269)

Signed-off-by: default avatarSteve French <smfrench@gmail.com>
Acked-by: default avatarShirish Pargaonkar <shirishpargaonkar@gmail.com>
Acked-by: default avatarSachin Prabhu <sprabhu@redhat.com>
Reviewed-by: default avatarJeff Layton <jlayton@poochiereds.net>
parent 8e353106
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -322,7 +322,7 @@ smb2_get_data_area_len(int *off, int *len, struct smb2_hdr *hdr)

	/* return pointer to beginning of data area, ie offset from SMB start */
	if ((*off != 0) && (*len != 0))
		return hdr->ProtocolId + *off;
		return (char *)(&hdr->ProtocolId[0]) + *off;
	else
		return NULL;
}