lkml.org 
[lkml]   [2022]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] um: remove unused variable
Date
The variable dead is initialized but never used otherwise.

Signed-off-by: Haowen Bai <baihaowen@meizu.com>
---
arch/um/os-Linux/umid.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/um/os-Linux/umid.c b/arch/um/os-Linux/umid.c
index a3dd61521d24..7a1abb829930 100644
--- a/arch/um/os-Linux/umid.c
+++ b/arch/um/os-Linux/umid.c
@@ -136,7 +136,7 @@ static int remove_files_and_dir(char *dir)
static inline int is_umdir_used(char *dir)
{
char pid[sizeof("nnnnnnnnn")], *end, *file;
- int dead, fd, p, n, err;
+ int fd, p, n, err;
size_t filelen = strlen(dir) + sizeof("/pid") + 1;

file = malloc(filelen);
@@ -145,7 +145,6 @@ static inline int is_umdir_used(char *dir)

snprintf(file, filelen, "%s/pid", dir);

- dead = 0;
fd = open(file, O_RDONLY);
if (fd < 0) {
fd = -errno;
--
2.7.4
\
 
 \ /
  Last update: 2022-06-01 09:47    [W:0.029 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site