From bee57c535c29a01cadfaa660d8c0182288960c33 Mon Sep 17 00:00:00 2001 From: Douglas Gilbert Date: Fri, 11 Jun 2021 03:57:05 +0000 Subject: sg_read_buffer: fix --length= problem; pt: new configure option --enable-pt_dummy builds the library with sg_pt_dummy.c instead of OS specific code git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@904 6180dd3e-e324-4e3e-922d-17de1ae2f315 --- src/sg_read_attr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/sg_read_attr.c') diff --git a/src/sg_read_attr.c b/src/sg_read_attr.c index bf27da1e..3f5d6528 100644 --- a/src/sg_read_attr.c +++ b/src/sg_read_attr.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 Douglas Gilbert. + * Copyright (c) 2016-2021 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. @@ -39,7 +39,7 @@ * and decodes the response. Based on spc5r08.pdf */ -static const char * version_str = "1.13 20191220"; +static const char * version_str = "1.14 20210610"; #define MAX_RATTR_BUFF_LEN (1024 * 1024) #define DEF_RATTR_BUFF_LEN (1024 * 8) @@ -323,7 +323,7 @@ find_sa_acron(const char * cp) for (mp = cp, k = 0; *mp; ++mp, ++k) { if (0 == anvp->acron[k]) return anvp->val; - if (tolower(*mp) != anvp->acron[k]) + if (tolower((uint8_t)*mp) != (uint8_t)anvp->acron[k]) break; } if ((0 == *mp) && (0 == anvp->acron[k])) @@ -827,7 +827,7 @@ main(int argc, char * argv[]) op->o_readonly = true; break; case 's': - if (isdigit(*optarg)) { + if (isdigit((uint8_t)*optarg)) { op->sa = sg_get_num(optarg); if ((op->sa < 0) || (op->sa > 63)) { pr2serr("bad argument to '--sa=SA', expect 0 to 63\n"); -- cgit v1.2.3