datatop: Fix out_dir array empty content verification
* Introduced by commit:
"datatop: add support to capture ip table stats
* Fixes the following error:
vendor/qcom/opensource/dataservices/datatop/src/datatop.c:203:20:
error: address of array 'usr_cl_opts.out_dir' will always
evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
Change-Id: I19ed8082b1a811451a73a571bc1a4076c20d454e
diff --git a/datatop/src/datatop.c b/datatop/src/datatop.c
index fba26e1..8da6539 100644
--- a/datatop/src/datatop.c
+++ b/datatop/src/datatop.c
@@ -200,7 +200,7 @@
}
if (usr_cl_opts.iptables_rules_routes == OPT_CHOSE) {
- if (!usr_cl_opts.out_dir) {
+ if (!strlen(usr_cl_opts.out_dir)) {
printf("Please provide an out directory.\n");
exit(EXIT_FAILURE);
}