summaryrefslogtreecommitdiff
path: root/usr/src/common
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2019-01-20 14:53:55 +0200
committerToomas Soome <tsoome@me.com>2019-04-24 15:54:23 +0300
commit8e718be9d8b2bb15811a2dc0b61cbb5cc5fa3070 (patch)
tree6c3d23734c1e395150d214f154e25edd089b9149 /usr/src/common
parent4da99751f967c5f8f04e17d8881a68c2940f3b06 (diff)
downloadillumos-joyent-8e718be9d8b2bb15811a2dc0b61cbb5cc5fa3070.tar.gz
10770 idm: NULL pointer errors
Reviewed by: Andy Stormont <astormont@racktopsystems.com> Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src/common')
-rw-r--r--usr/src/common/iscsi/base64.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr/src/common/iscsi/base64.c b/usr/src/common/iscsi/base64.c
index f4f336480e..3ee84e4055 100644
--- a/usr/src/common/iscsi/base64.c
+++ b/usr/src/common/iscsi/base64.c
@@ -72,7 +72,7 @@ outdec64(unsigned char *out, unsigned char *chr, int num)
switch (num) {
case 0:
- case 1: /* these are impossible */
+ case 1: /* these are impossible */
default:
break;
case 2: /* 2 base64 bytes == 1 decoded byte */
@@ -132,7 +132,7 @@ iscsi_base64_str_to_binary(char *hstr, int hstr_len,
*out_len = 0;
iptr = hstr;
- while (((curchr = *(iptr++)) != NULL) &&
+ while (((curchr = *(iptr++)) != '\0') &&
(((uintptr_t)iptr - (uintptr_t)hstr) <= hstr_len)) {
/* decode chars */
if (curchr == '=') /* if end */
@@ -186,7 +186,7 @@ int
iscsi_binary_to_base64_str(uint8_t *in_buf, int in_buf_len,
char *base64_str_buf, int base64_buf_len)
{
- uint8_t *iptr;
+ uint8_t *iptr;
char *optr;
int in_bytes_remaining;