Module Name:    src
Committed By:   joerg
Date:           Mon Nov 18 20:03:02 UTC 2013

Modified Files:
        src/dist/nvi/common: api.c

Log Message:
Change content of string, don't overwrite the newly allocated pointer.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/dist/nvi/common/api.c

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

Modified files:

Index: src/dist/nvi/common/api.c
diff -u src/dist/nvi/common/api.c:1.2 src/dist/nvi/common/api.c:1.3
--- src/dist/nvi/common/api.c:1.2	Fri Dec  5 22:51:42 2008
+++ src/dist/nvi/common/api.c	Mon Nov 18 20:03:02 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: api.c,v 1.2 2008/12/05 22:51:42 christos Exp $ */
+/*	$NetBSD: api.c,v 1.3 2013/11/18 20:03:02 joerg Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993, 1994
@@ -438,7 +438,7 @@ api_opts_get(SCR *sp, const CHAR_T *name
 	case OPT_STR:
 		if (O_STR(sp, offset) == NULL) {
 			MALLOC_RET(sp, *value, char *, 2);
-			value[0] = '\0';
+			value[0][0] = '\0';
 		} else {
 			MALLOC_RET(sp,
 			    *value, char *, strlen(O_STR(sp, offset)) + 1);

Reply via email to