Commit Diff


commit - 46e4e74b0a512a6d37edcb8c711bc972f0adc908
commit + ae6f257a8d22174cb2326cd60d690cceea59fa8e
blob - 77de75646546540002bbceae3dd6519ef4739dcb
blob + e13036d70273f0b68f3d8b52fb1aa961de7e7703
--- kamid/client.c
+++ kamid/client.c
@@ -763,7 +763,7 @@ np_read8(const char *t, const char *f, uint8_t *dst, c
 	if (*len < sizeof(*dst)) {
 		log_warnx("%s: wanted %zu bytes for the %s field but only "
 		    "%zu are available.", t, sizeof(*dst), f, *len);
-		return -1;
+		return 0;
 	}
 
 	memcpy(dst, *src, sizeof(*dst));
@@ -780,7 +780,7 @@ np_read16(const char *t, const char *f, uint16_t *dst,
 	if (*len < sizeof(*dst)) {
 		log_warnx("%s: wanted %zu bytes for the %s field but only "
 		    "%zu are available.", t, sizeof(*dst), f, *len);
-		return -1;
+		return 0;
 	}
 
 	memcpy(dst, *src, sizeof(*dst));
@@ -798,7 +798,7 @@ np_read32(const char *t, const char *f, uint32_t *dst,
 	if (*len < sizeof(*dst)) {
 		log_warnx("%s: wanted %zu bytes for the %s field but only "
 		    "%zu are available.", t, sizeof(*dst), f, *len);
-		return -1;
+		return 0;
 	}
 
 	memcpy(dst, *src, sizeof(*dst));
@@ -816,7 +816,7 @@ np_read64(const char *t, const char *f, uint64_t *dst,
 	if (*len < sizeof(*dst)) {
 		log_warnx("%s: wanted %zu bytes for the %s field but only "
 		    "%zu are available.", t, sizeof(*dst), f, *len);
-		return -1;
+		return 0;
 	}
 
 	memcpy(dst, *src, sizeof(*dst));