From dfd044930689aa6d2af94d15d1372923c5302ffb Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Thu, 5 Oct 2023 12:33:13 +0200 Subject: Fix issues detected by SonarCloud. Signed-off-by: Toni Uhlig --- examples/c-captured/c-captured.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'examples/c-captured/c-captured.c') diff --git a/examples/c-captured/c-captured.c b/examples/c-captured/c-captured.c index 8eac71ab3..e810f3e70 100644 --- a/examples/c-captured/c-captured.c +++ b/examples/c-captured/c-captured.c @@ -1354,7 +1354,10 @@ int main(int argc, char ** argv) } return 1; } - chmod(datadir, S_IRWXU); + if (datadir != NULL) + { + chmod(datadir, S_IRWXU); + } if (nDPIsrvd_set_read_timeout(sock, 180, 0) != 0) { -- cgit v1.2.3