[PATCH] Remove dead code in function dwz

Tom de Vries tdevries@suse.de
Tue Mar 2 10:10:09 GMT 2021


Hi,

Function dwz contains this code:
...
  free (dso);
  if (ret == 0 && !low_mem)
    res->res = 0;
...

The value of low_mem will always be false here.  At that point, cleanup has
been called, which resets multifile_mode back to 0.

Fix this by removing the "&& !low_mem".

Any comments?

Thanks,
- Tom

Remove dead code in function dwz

2021-03-02  Tom de Vries  <tdevries@suse.de>

	* dwz.c (dwz): Remove dead code.

---
 dwz.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dwz.c b/dwz.c
index d5fe7b1..1d7d815 100644
--- a/dwz.c
+++ b/dwz.c
@@ -15595,7 +15595,7 @@ dwz (const char *file, const char *outfile, struct file_result *res,
   close (fd);
 
   free (dso);
-  if (ret == 0 && !low_mem)
+  if (ret == 0)
     res->res = 0;
   if (ret == 3)
     {


More information about the Dwz mailing list