summaryrefslogtreecommitdiff
path: root/util/isensor.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2025-03-16 13:33:45 +0100
committerJörg Frings-Fürst <debian@jff.email>2025-03-16 13:33:45 +0100
commit5ad8be875662e799ca8739e267b4879bb281a048 (patch)
tree1b44e7d6fd8446f8c3e2fc8f1ef3af281d590fab /util/isensor.c
parent9641459c047738b492ab6002a9d38d286e237721 (diff)
parentb5b2075a902277c33d7cf1b82f49f0fac7ef4cb9 (diff)
Update upstream source from tag 'upstream/3.2.1'
Update to upstream version '3.2.1' with Debian dir d1f78609c2f728d0641d47c8ca34241c348f8f21
Diffstat (limited to 'util/isensor.c')
-rw-r--r--util/isensor.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/util/isensor.c b/util/isensor.c
index a3fc650..b6432e3 100644
--- a/util/isensor.c
+++ b/util/isensor.c
@@ -625,7 +625,7 @@ int get_idx_range(char *str)
return(0);
}
-char *get_unit_type(int iunits, int ibase, int imod, int fshort)
+char *get_unit_type(uchar iunits, uchar ibase, uchar imod, int fshort)
{
char *pstr = NULL;
char **punittypes;
@@ -1332,13 +1332,14 @@ int GetSDR(int r_id, int *r_next, uchar *recdata, int srecdata, int *rlen)
if (sresp < (thislen+2)) {
/* There are some SDRs that may report the wrong length, and
* return less bytes than they reported, so just truncate. */
+ fprintf(stderr,"SDR record %x is malformed, length %d is less than minimum %d\n",r_id,sresp,thislen+2);
if (fdebug) printf("sdr[%x] off=%d, expected %d, got %d\n",
r_id,off,thislen+2,sresp);
if (sresp >= 2) thislen = sresp - 2;
else thislen = 0;
reclen = off + thislen; /* truncate, stop reading */
- fprintf(stderr,"SDR record %x is malformed, length %d is less than minimum %d\n",r_id,sresp,thislen+2);
- rc = ERR_SDR_MALFORMED;
+ /* auto-corrected, so not a fatal error */
+ // rc = ERR_SDR_MALFORMED;
}
/* successful */
memcpy(&resp[off],&respchunk[2],thislen);