summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaowen Bai <baihaowen@meizu.com>2022-06-01 15:46:05 +0800
committerRichard Weinberger <richard@nod.at>2022-07-17 23:26:27 +0200
commit6e12adcc61961dbc9bcf773dc8ff325fdba5852b (patch)
treedfd61a991f9593c07bee514871dcb8f133fbe95b
parentc6496e0a4a90d8149203c16323cff3fa46e422e7 (diff)
um: remove unused variable
The variable dead is initialized but never used otherwise. Signed-off-by: Haowen Bai <baihaowen@meizu.com> Signed-off-by: Richard Weinberger <richard@nod.at>
-rw-r--r--arch/um/os-Linux/umid.c3
1 files changed, 1 insertions, 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 @@ out:
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;