smbd: Slightly simplify vfswrap_fsctl
authorVolker Lendecke <vl@samba.org>
Wed, 12 Feb 2014 14:22:26 +0000 (14:22 +0000)
committerMichael Adam <obnox@samba.org>
Wed, 12 Feb 2014 20:47:31 +0000 (21:47 +0100)
We have the MIN macro, so use it :-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
source3/modules/vfs_default.c

index 5c48d04f1c4105b912db984ad9e3949d996678c6..81a0b1bb6d66fcb91405c613282e82777c4ed1b6 100644 (file)
@@ -1054,7 +1054,8 @@ static NTSTATUS vfswrap_fsctl(struct vfs_handle_struct *handle,
                DEBUG(10,("FSCTL_CREATE_OR_GET_OBJECT_ID: called on %s\n",
                          fsp_fnum_dbg(fsp)));
 
-               *out_len = (max_out_len >= 64) ? 64 : max_out_len;
+               *out_len = MIN(max_out_len, 64);
+
                /* Hmmm, will this cause problems if less data asked for? */
                return_data = talloc_array(ctx, char, 64);
                if (return_data == NULL) {