Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/mkdep fix empty suffix case.
details: https://anonhg.NetBSD.org/src/rev/afeec6754032
branches: trunk
changeset: 755184:afeec6754032
user: christos <christos%NetBSD.org@localhost>
date: Wed May 26 18:07:34 2010 +0000
description:
fix empty suffix case.
diffstat:
usr.bin/mkdep/mkdep.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r ec1da258ae44 -r afeec6754032 usr.bin/mkdep/mkdep.c
--- a/usr.bin/mkdep/mkdep.c Wed May 26 17:52:35 2010 +0000
+++ b/usr.bin/mkdep/mkdep.c Wed May 26 18:07:34 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mkdep.c,v 1.34 2010/05/26 15:04:40 christos Exp $ */
+/* $NetBSD: mkdep.c,v 1.35 2010/05/26 18:07:34 christos Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
#if !defined(lint)
__COPYRIGHT("@(#) Copyright (c) 1999 The NetBSD Foundation, Inc.\
All rights reserved.");
-__RCSID("$NetBSD: mkdep.c,v 1.34 2010/05/26 15:04:40 christos Exp $");
+__RCSID("$NetBSD: mkdep.c,v 1.35 2010/05/26 18:07:34 christos Exp $");
#endif /* not lint */
#include <sys/mman.h>
@@ -269,7 +269,7 @@
if (suff_list == NULL)
err(2, "malloc");
sl = suff_list;
- for (s = suffixes; (s = strchr(s, '.')); s += sz, sl++ ) {
+ for (s = suffixes; (s = strchr(s, '.')); s += sz, sl++) {
sz = strcspn(s, ", ");
if (sz > sizeof sl->suff)
errx(2, "suffix too long");
@@ -368,7 +368,7 @@
* Not found, check for .o, since the
* original file will have it.
*/
- if (sl->len == 0) {
+ if (sl->len == 0 && suff_list->len != 0) {
if (memcmp(suf - 2, ".o", 2) == 0)
slen = 2;
else
Home |
Main Index |
Thread Index |
Old Index