shell: Set empty argument if optarg is NULL
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 29 Aug 2022 21:33:04 +0000 (14:33 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 15 May 2023 09:25:54 +0000 (14:55 +0530)
commita81fc867d9f4dfb5d44e15cd32302b9e677598d2
tree6aee89947e2de5103ec0c1fdd0f6d30b29a4edee
parentc4e438ca8d881935c18f2c0c2cf1c6fababa94a2
shell: Set empty argument if optarg is NULL

This sets enmpty string ("") when argument don't set any optarg so the
application can tell when an option was set or not.

Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
src/shared/shell.c