[PATCH] syscall: replace if (debug_flag) ... with debug_msg macro

Harsha Sharma harshasharmaiitr at gmail.com
Wed Dec 20 17:33:01 UTC 2017


Replace if (debug_flag) error_msg(...) with debug_msg debug printing macro

Signed-off-by: Harsha Sharma <harshasharmaiitr at gmail.com>
---
 syscall.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/syscall.c b/syscall.c
index b1047feb..1deeff2e 100644
--- a/syscall.c
+++ b/syscall.c
@@ -1211,9 +1211,8 @@ get_scno(struct tcb *tcp)
 
 		set_tcb_priv_data(tcp, s, free_sysent_buf);
 
-		if (debug_flag)
-			error_msg("pid %d invalid syscall %" PRI_kld,
-				  tcp->pid, tcp->scno);
+		debug_msg("pid %d invalid syscall %" PRI_kld, tcp->pid,
+			  tcp->scno);
 	}
 	return 1;
 }
-- 
2.11.0





More information about the Strace-devel mailing list