44 lines
1.2 KiB
Diff
44 lines
1.2 KiB
Diff
|
From addd3c1ab24b64e9569095bcf02378904444f744 Mon Sep 17 00:00:00 2001
|
||
|
From: Phil Sutter <phil@nwl.cc>
|
||
|
Date: Fri, 25 Mar 2022 10:15:13 +0100
|
||
|
Subject: [PATCH] Drop pointless assignments
|
||
|
|
||
|
These variables are not referred to after assigning within their scope
|
||
|
(or until they're overwritten).
|
||
|
|
||
|
Signed-off-by: Phil Sutter <phil@nwl.cc>
|
||
|
(cherry picked from commit 5ecb1226d73eb4f9407faa8d663d7038046d34c6)
|
||
|
---
|
||
|
src/helpers/ssdp.c | 1 -
|
||
|
src/main.c | 2 +-
|
||
|
2 files changed, 1 insertion(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/src/helpers/ssdp.c b/src/helpers/ssdp.c
|
||
|
index 58658e39d0a21..41a637a9ce720 100644
|
||
|
--- a/src/helpers/ssdp.c
|
||
|
+++ b/src/helpers/ssdp.c
|
||
|
@@ -259,7 +259,6 @@ static int find_hdr(const char *name, const uint8_t *data, int data_len,
|
||
|
data += i+2;
|
||
|
}
|
||
|
|
||
|
- data_len -= name_len;
|
||
|
data += name_len;
|
||
|
if (pos)
|
||
|
*pos = data;
|
||
|
diff --git a/src/main.c b/src/main.c
|
||
|
index 7062e12085f11..8c3fa1c943a96 100644
|
||
|
--- a/src/main.c
|
||
|
+++ b/src/main.c
|
||
|
@@ -320,7 +320,7 @@ int main(int argc, char *argv[])
|
||
|
|
||
|
umask(0177);
|
||
|
|
||
|
- if ((ret = init_config(config_file)) == -1) {
|
||
|
+ if (init_config(config_file) == -1) {
|
||
|
dlog(LOG_ERR, "can't open config file `%s'", config_file);
|
||
|
exit(EXIT_FAILURE);
|
||
|
}
|
||
|
--
|
||
|
2.34.1
|
||
|
|