diff --git a/system/system/system.c b/system/system/system.c index f96a931f5..05d421a3c 100644 --- a/system/system/system.c +++ b/system/system/system.c @@ -156,7 +156,7 @@ int system(FAR const char *cmd) if (errcode != 0) { - serr("ERROR: Spawn failed: %d\n", result); + serr("ERROR: Spawn failed: %d\n", errcode); goto errout_with_attrs; }