From fcd69d1cdfd1ff0c02bbbc20f2ea9f4b16c182bd Mon Sep 17 00:00:00 2001 From: "chao.an" Date: Mon, 20 Dec 2021 16:02:22 +0800 Subject: [PATCH] system/lzf: correct the open mode Signed-off-by: chao.an --- system/lzf/lzf_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/system/lzf/lzf_main.c b/system/lzf/lzf_main.c index e29669c07..3c488f302 100644 --- a/system/lzf/lzf_main.c +++ b/system/lzf/lzf_main.c @@ -311,7 +311,6 @@ short_read: static int open_out(FAR const char *name) { - int fd; int m = O_EXCL; if (g_force) @@ -319,8 +318,7 @@ static int open_out(FAR const char *name) m = 0; } - fd = open(name, O_CREAT | O_WRONLY | O_TRUNC | m, 600); - return fd; + return open(name, O_CREAT | O_WRONLY | O_TRUNC | m, 0600); } static int compose_name(FAR const char *fname, FAR char *oname, int namelen)