From 29fbcc3d5124c2109c0c05aeba6d53d99cb9eba1 Mon Sep 17 00:00:00 2001 From: Douglas Gilbert Date: Sun, 27 Oct 2019 21:44:39 +0000 Subject: sg_logs: change '-ll' option to suppress subpages=0xff, apart from page 0x0,0xff; asc/ascq sync with asc-num.txt @t10 20191014; sg_chk_asc: tweak for LF terminated lines git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@834 6180dd3e-e324-4e3e-922d-17de1ae2f315 --- testing/sg_chk_asc.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'testing/sg_chk_asc.c') diff --git a/testing/sg_chk_asc.c b/testing/sg_chk_asc.c index dd320fd5..a7844441 100644 --- a/testing/sg_chk_asc.c +++ b/testing/sg_chk_asc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2018 Douglas Gilbert. + * Copyright (c) 2006-2019 Douglas Gilbert. * All rights reserved. * Use of this source code is governed by a BSD-style * license that can be found in the BSD_LICENSE file. @@ -27,7 +27,7 @@ * http://www.t10.org/lists/asc-num.txt */ -static const char * version_str = "1.07 20181207"; +static const char * version_str = "1.08 20191014"; #define MAX_LINE_LEN 1024 @@ -163,10 +163,9 @@ printf("\"%s\",\n", b); strncpy(b , line + offset, sizeof(b) - 1); b[sizeof(b) - 1] = '\0'; num = strlen(b); - if (0xd == b[num - 2]) { + if (0xd == b[num - 2]) b[num - 2] = '\0'; - b[num - 1] = '\0'; - } + b[num - 1] = '\0'; num = strlen(b); for (j = 0; j < num; ++j) b[j] = toupper(b[j]); -- cgit v1.2.3