From 00d58087494bffddbfc940fdf6efbbc1ab5a658a Mon Sep 17 00:00:00 2001 From: Stefan Rueger Date: Sun, 28 Jun 2026 14:16:26 +0100 Subject: [PATCH] Remove not needed cleaning of type component The type component of the programmer is set at runtime. As such it does not need to be part of the raw dump of the configuration values for the developer option -c*/r. As the type component is not used in the raw dump, the removed code does not serve a purpose. --- src/developer_opts.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/developer_opts.c b/src/developer_opts.c index eb0b2391..f840b23c 100644 --- a/src/developer_opts.c +++ b/src/developer_opts.c @@ -1231,7 +1231,7 @@ void dev_output_part_defs(char *partdesc) { static void dev_pgm_raw(const PROGRAMMER *pgm) { PROGRAMMER dp; - int len, idx; + int idx; char *id = ldata(lfirst(pgm->id)); LNODEID ln; @@ -1257,10 +1257,6 @@ static void dev_pgm_raw(const PROGRAMMER *pgm) { if(dp.usbproduct && *dp.usbproduct) dev_raw_dump(dp.usbproduct, strlen(dp.usbproduct) + 1, id, "usbprod", 0); - // Zap all bytes beyond terminating nul of type array - if((len = (int) strlen(dp.type) + 1) < (int) sizeof dp.type) - memset(dp.type + len, 0, sizeof dp.type - len); - // Zap address values dp.desc = NULL; dp.id = NULL;