Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/dist/nvi/common Change content of string, don't overwrite th...
details: https://anonhg.NetBSD.org/src/rev/fc8c3895e76f
branches: trunk
changeset: 791448:fc8c3895e76f
user: joerg <joerg%NetBSD.org@localhost>
date: Mon Nov 18 20:03:02 2013 +0000
description:
Change content of string, don't overwrite the newly allocated pointer.
diffstat:
dist/nvi/common/api.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (18 lines):
diff -r 522d074e14b3 -r fc8c3895e76f dist/nvi/common/api.c
--- a/dist/nvi/common/api.c Mon Nov 18 19:55:59 2013 +0000
+++ b/dist/nvi/common/api.c Mon Nov 18 20:03:02 2013 +0000
@@ -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 @@
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);
Home |
Main Index |
Thread Index |
Old Index