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>
(cherry picked from commit
ff80f68c3020be0a92eb41115a64518ece097ee7)
/* 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++;