shell: Remove unnecessary initialization of err

All code paths in shell_exec() are guaranteed to set err before
returning it, so doing this (rather curious) initialization is
completely unnecessary.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2017-11-15 08:29:14 +02:00 committed by Johan Hedberg
commit 04fbb80adb

View file

@ -367,8 +367,6 @@ int shell_exec(char *line)
return -EINVAL;
}
err = argc;
cb = get_cb(&argc, argv, &module);
if (!cb) {
if (app_cmd_handler != NULL) {