You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/04/29 13:10:59 UTC

[incubator-nuttx] 08/08: net/usrsock: fix error: variable 'pos' is used uninitialized

This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 5b839061f960cadb3fda19a51679484b95f8d6e3
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Wed Apr 29 18:15:18 2020 +0800

    net/usrsock: fix error: variable 'pos' is used uninitialized
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 net/usrsock/usrsock_dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/usrsock/usrsock_dev.c b/net/usrsock/usrsock_dev.c
index 19987d9..f07acef 100644
--- a/net/usrsock/usrsock_dev.c
+++ b/net/usrsock/usrsock_dev.c
@@ -449,7 +449,7 @@ static off_t usrsockdev_seek(FAR struct file *filep, off_t offset,
         {
           pos = dev->req.pos + offset;
         }
-      else if (whence == SEEK_SET)
+      else
         {
           pos = offset;
         }