From 9392ccec22b80802238c06f480a430ef40cd220c Mon Sep 17 00:00:00 2001 From: Ralph Metzler Date: Mon, 9 Jan 2017 19:27:27 +0100 Subject: [PATCH] fix error handling and ID output length --- apps/octonet/ddtest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/octonet/ddtest.c b/apps/octonet/ddtest.c index f5bbb1b..221ff90 100644 --- a/apps/octonet/ddtest.c +++ b/apps/octonet/ddtest.c @@ -1310,10 +1310,10 @@ int read_id(int dev, int argc, char* argv[], uint32_t Flags) break; default: printf("Unsupported Flash\n"); - break; + return -1; } printf("ID: "); - for (i = 0; i < 8; i++) + for (i = 0; i < len; i++) printf("%02x ", Id[i]); printf("\n");