mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
srvsvc: Use a struct assignment in enum_file_fn()
Looks nicer than 5 complex array references... Bug: https://bugzilla.samba.org/show_bug.cgi?id=14355 Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
a9397f8788
commit
ff80f68c30
@ -155,12 +155,14 @@ static int enum_file_fn(struct file_id id,
|
||||
|
||||
/* now fill in the srvsvc_NetFileInfo3 struct */
|
||||
|
||||
ctr3->array[i].fid =
|
||||
(((uint32_t)(procid_to_pid(&e->pid))<<16) | e->share_file_id);
|
||||
ctr3->array[i].permissions = permissions;
|
||||
ctr3->array[i].num_locks = num_locks;
|
||||
ctr3->array[i].path = fullpath;
|
||||
ctr3->array[i].user = username;
|
||||
ctr3->array[i] = (struct srvsvc_NetFileInfo3) {
|
||||
.fid = (((uint32_t)(procid_to_pid(&e->pid))<<16) |
|
||||
e->share_file_id),
|
||||
.permissions = permissions,
|
||||
.num_locks = num_locks,
|
||||
.path = fullpath,
|
||||
.user = username,
|
||||
};
|
||||
|
||||
ctr3->count++;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user