From 83a87e08e8ed1e24204694a13e1880235404421b Mon Sep 17 00:00:00 2001 From: Juha Niskanen Date: Mon, 22 Jan 2018 07:14:32 -0600 Subject: [PATCH] fs/userfs: use correct req type in userfs_truncate, remove use of undeclared buf --- fs/userfs/fs_userfs.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/userfs/fs_userfs.c b/fs/userfs/fs_userfs.c index bf91d58c1e..3cb7a10b21 100644 --- a/fs/userfs/fs_userfs.c +++ b/fs/userfs/fs_userfs.c @@ -944,7 +944,7 @@ static int userfs_truncate(FAR struct file *filep, off_t length) /* Construct and send the request to the server */ req = (FAR struct userfs_truncate_request_s *)priv->iobuffer; - req->req = USERFS_REQ_FSTAT; + req->req = USERFS_REQ_TRUNCATE; req->openinfo = filep->f_priv; req->length = length; @@ -986,7 +986,6 @@ static int userfs_truncate(FAR struct file *filep, off_t length) /* Return the result of truncate operation */ - DEBUGASSERT(buf != NULL); return resp->ret; }