about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-01-09 07:38:49 +0000
committerEric Wong <e@80x24.org>2023-01-09 07:38:49 +0000
commit718b313cf3fee3799cdea3ecbbfba8a615066baf (patch)
tree9f801ca48606590908c0dcc19817ed92c01bbbd8
parent4dc4efe067e6d09efee3e223558f303f6e4091f0 (diff)
downloadmwrap-718b313cf3fee3799cdea3ecbbfba8a615066baf.tar.gz
This works around a gcc (Debian 10.2.1-6) warning,
and is less code, even
-rw-r--r--mwrap_core.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/mwrap_core.h b/mwrap_core.h
index 15df857..deb3bb3 100644
--- a/mwrap_core.h
+++ b/mwrap_core.h
@@ -389,10 +389,8 @@ static const char *mw_perl_src_file_cstr(unsigned *lineno)
 {
         const COP *cop = mwp_curcop();
         if (!cop) return NULL;
-        const char *fn = CopFILE(cop);
-        if (!fn) return NULL;
         *lineno = CopLINE(cop);
-        return fn;
+        return CopFILE(cop);
 }
 #        define SRC_FILE_CSTR(lineno) mw_perl_src_file_cstr(lineno)
 #endif /* MWRAP_PERL */