aboutsummaryrefslogtreecommitdiff
path: root/src/sg_read_attr.c
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2021-06-11 03:57:05 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2021-06-11 03:57:05 +0000
commitbee57c535c29a01cadfaa660d8c0182288960c33 (patch)
tree2a9355f53953526dc12f101d6bf6b26962f5dbbe /src/sg_read_attr.c
parent30363466e3580cae5f428c9bf35caa934cef469b (diff)
downloadsg3_utils-bee57c535c29a01cadfaa660d8c0182288960c33.tar.gz
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
Diffstat (limited to 'src/sg_read_attr.c')
-rw-r--r--src/sg_read_attr.c8
1 files changed, 4 insertions, 4 deletions
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");