summaryrefslogtreecommitdiff
path: root/examples/c-captured/c-captured.c
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2023-10-05 12:33:13 +0200
committerToni Uhlig <matzeton@googlemail.com>2023-10-05 17:26:06 +0200
commitdfd044930689aa6d2af94d15d1372923c5302ffb (patch)
tree7ad9cc59c2d54c76c6b08d813f93d7730f0b45e7 /examples/c-captured/c-captured.c
parent07f2c2d9cc7e29b53de42c3849bc3c2e6b6b8fb9 (diff)
Fix issues detected by SonarCloud.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'examples/c-captured/c-captured.c')
-rw-r--r--examples/c-captured/c-captured.c5
1 files changed, 4 insertions, 1 deletions
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)
{