s3-samr: remove total_data_size variable in _samr_QueryDisplayInfo.
authorGünther Deschner <gd@samba.org>
Sat, 6 Jun 2009 22:44:51 +0000 (00:44 +0200)
committerGünther Deschner <gd@samba.org>
Sat, 6 Jun 2009 22:55:45 +0000 (00:55 +0200)
Guenther

source3/rpc_server/srv_samr_nt.c

index 396365bc179dad06fd6431afe26ec06480326152..6e990a319fb4055dfabd0134fd2012deb8ff904d 100644 (file)
@@ -1410,7 +1410,7 @@ NTSTATUS _samr_QueryDisplayInfo(pipes_struct *p,
 
        union samr_DispInfo *disp_info = r->out.info;
 
-       uint32 temp_size=0, total_data_size=0;
+       uint32 temp_size=0;
        NTSTATUS disp_ret = NT_STATUS_UNSUCCESSFUL;
        uint32 num_account = 0;
        enum remote_arch_types ra_type = get_remote_arch();
@@ -1591,9 +1591,6 @@ NTSTATUS _samr_QueryDisplayInfo(pipes_struct *p,
        if (!NT_STATUS_IS_OK(disp_ret))
                return disp_ret;
 
-       /* calculate the total size */
-       total_data_size=num_account*struct_size;
-
        if (max_entries <= num_account) {
                status = STATUS_MORE_ENTRIES;
        } else {
@@ -1605,7 +1602,7 @@ NTSTATUS _samr_QueryDisplayInfo(pipes_struct *p,
 
        DEBUG(5, ("_samr_QueryDisplayInfo: %d\n", __LINE__));
 
-       *r->out.total_size = total_data_size;
+       *r->out.total_size = num_account * struct_size;
        *r->out.returned_size = temp_size;
 
        return status;