From 782b7cefbf8923700d6cd2777e7ccbdeda7f6ce0 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Tue, 11 Jan 2022 12:18:35 -0500 Subject: fix scan-build/cppcheck warnings --- src/fcopy/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/fcopy') diff --git a/src/fcopy/main.c b/src/fcopy/main.c index a9443a764..c64d20127 100644 --- a/src/fcopy/main.c +++ b/src/fcopy/main.c @@ -200,7 +200,8 @@ static char *proc_pid_to_self(const char *target) { // check where /proc/self points to static const char proc_self[] = "/proc/self"; - if (!(proc_pid = realpath(proc_self, NULL))) + proc_pid = realpath(proc_self, NULL); + if (proc_pid == NULL) goto done; // redirect /proc/PID/xxx -> /proc/self/XXX -- cgit v1.2.3-70-g09d2