Module Name:    src
Committed By:   thorpej
Date:           Mon Jun  8 21:31:56 UTC 2020

Modified Files:
        src/common/lib/libprop: prop_data.c

Log Message:
Fix a paste-o that caused prop_data_create_copy() to be intolerant
of creating empty data objects.  Fixes t_ifconfig::ifconfig_description
unit test.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/common/lib/libprop/prop_data.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/common/lib/libprop/prop_data.c
diff -u src/common/lib/libprop/prop_data.c:1.16 src/common/lib/libprop/prop_data.c:1.17
--- src/common/lib/libprop/prop_data.c:1.16	Sat Jun  6 21:25:59 2020
+++ src/common/lib/libprop/prop_data.c	Mon Jun  8 21:31:56 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: prop_data.c,v 1.16 2020/06/06 21:25:59 thorpej Exp $	*/
+/*	$NetBSD: prop_data.c,v 1.17 2020/06/08 21:31:56 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2020 The NetBSD Foundation, Inc.
@@ -273,9 +273,6 @@ prop_data_create_copy(const void *v, siz
 	prop_data_t pd;
 	void *nv;
 
-	if (v == NULL || size == 0)
-		return (NULL);
-
 	/* Tolerate the creation of empty data objects. */
 	if (v != NULL && size != 0) {
 		nv = _PROP_MALLOC(size, M_PROP_DATA);

Reply via email to