2016-01-05 09:12:30

by Andrei Emeltchenko

[permalink] [raw]
Subject: [PATCH] obexd: Remove dead code

From: Andrei Emeltchenko <[email protected]>

Variables file and name are always NULL making code dead.
---
obexd/src/log.c | 9 ---------
1 file changed, 9 deletions(-)

diff --git a/obexd/src/log.c b/obexd/src/log.c
index f259728..7c48664 100644
--- a/obexd/src/log.c
+++ b/obexd/src/log.c
@@ -102,20 +102,11 @@ void __obex_log_init(const char *debug, int detach)
{
int option = LOG_NDELAY | LOG_PID;
struct obex_debug_desc *desc;
- const char *name = NULL, *file = NULL;

if (debug != NULL)
enabled = g_strsplit_set(debug, ":, ", 0);

for (desc = __start___debug; desc < __stop___debug; desc++) {
- if (file != NULL || name != NULL) {
- if (g_strcmp0(desc->file, file) == 0) {
- if (desc->name == NULL)
- desc->name = name;
- } else
- file = NULL;
- }
-
if (is_enabled(desc))
desc->flags |= OBEX_DEBUG_FLAG_PRINT;
}
--
2.5.0