summaryrefslogtreecommitdiff
path: root/lib/inet_pton.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/inet_pton.c')
-rw-r--r--lib/inet_pton.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/inet_pton.c b/lib/inet_pton.c
index 4923cae24..ada57af28 100644
--- a/lib/inet_pton.c
+++ b/lib/inet_pton.c
@@ -1,6 +1,6 @@
/* This is from the BIND 4.9.4 release, modified to compile by itself */
-/* Copyright (c) 1996 - 2020 by Internet Software Consortium.
+/* Copyright (c) 1996 - 2021 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -174,7 +174,7 @@ inet_pton6(const char *src, unsigned char *dst)
pch = strchr((xdigits = xdigits_l), ch);
if(!pch)
pch = strchr((xdigits = xdigits_u), ch);
- if(pch != NULL) {
+ if(pch) {
val <<= 4;
val |= (pch - xdigits);
if(++saw_xdigit > 4)
@@ -211,7 +211,7 @@ inet_pton6(const char *src, unsigned char *dst)
*tp++ = (unsigned char) ((val >> 8) & 0xff);
*tp++ = (unsigned char) (val & 0xff);
}
- if(colonp != NULL) {
+ if(colonp) {
/*
* Since some memmove()'s erroneously fail to handle
* overlapping regions, we'll do the shift by hand.