smbd: Apply some const to find_share_mode_oplock
authorVolker Lendecke <vl@samba.org>
Mon, 4 Nov 2013 11:37:18 +0000 (11:37 +0000)
committerJose A. Rivera <jarrpa@redhat.com>
Thu, 12 Jun 2014 22:44:40 +0000 (15:44 -0700)
source3/smbd/open.c

index 33a25da8c97302f59292d35b0dfd36a2ca7d48fc..3b1687298ecfafa811f4c8e0929e3cdaf208e8cc 100644 (file)
@@ -1486,14 +1486,14 @@ static bool file_has_brlocks(files_struct *fsp)
 }
 
 static struct share_mode_oplock *find_share_mode_oplock(
-       struct share_mode_data *d, struct smb2_lease_key *key,
+       struct share_mode_data *d, const struct smb2_lease_key *key,
        uint16_t *idx)
 {
        uint16_t i;
 
        for (i=0; i<d->num_leases; i++) {
                struct share_mode_oplock *l = &d->leases[i];
-               struct share_lease_key *k = &l->lease_key;
+               const struct share_lease_key *k = &l->lease_key;
                if ((key->data[0] == k->data[0]) &&
                    (key->data[1] == k->data[1])) {
                        *idx = i;