소스 검색

cmd_md5sum.c: remove dead code / fix warning

commit ecd729500 "Add parameter to md5sum to save the md5 sum"
adds support to build a string to be saved in the env and tries
to zero end it with str_ptr = '\0'; This does actually set the
pointer to the end of the buffer itself to zero. Since the
string was already zero terminated by the sprintf before it,
just remove the line, preventing a clang warning.

cc: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
Jeroen Hofstee 11 년 전
부모
커밋
9fb70f31fe
1개의 변경된 파일0개의 추가작업 그리고 1개의 파일을 삭제
  1. 0 1
      common/cmd_md5sum.c

+ 0 - 1
common/cmd_md5sum.c

@@ -33,7 +33,6 @@ static void store_result(const u8 *sum, const char *dest)
 			sprintf(str_ptr, "%02x", sum[i]);
 			str_ptr += 2;
 		}
-		str_ptr = '\0';
 		setenv(dest, str_output);
 	}
 }