summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/tradcpp.c
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2003-02-10 05:41:50 +0000
committerkan <kan@FreeBSD.org>2003-02-10 05:41:50 +0000
commit793833d7a78bb624965885760593495e7079d705 (patch)
treef843ff90d71b900271088361ed96ff82eb2a365d /contrib/gcc/tradcpp.c
parent1b04fed26051ebc88f26a7bb93c63c270970e773 (diff)
downloadFreeBSD-src-793833d7a78bb624965885760593495e7079d705.zip
FreeBSD-src-793833d7a78bb624965885760593495e7079d705.tar.gz
Gcc 3.2.2-release.
Diffstat (limited to 'contrib/gcc/tradcpp.c')
-rw-r--r--contrib/gcc/tradcpp.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/contrib/gcc/tradcpp.c b/contrib/gcc/tradcpp.c
index 979179c..f277eba 100644
--- a/contrib/gcc/tradcpp.c
+++ b/contrib/gcc/tradcpp.c
@@ -1,5 +1,5 @@
/* C Compatible Compiler Preprocessor (CCCP)
-Copyright (C) 1986, 1987, 1989, 2000, 2001 Free Software Foundation, Inc.
+Copyright (C) 1986, 1987, 1989, 2000, 2001, 2003 Free Software Foundation, Inc.
Written by Paul Rubin, June 1986
Adapted to ANSI C, Richard Stallman, Jan 1987
Dusted off, polished, and adapted for use as traditional
@@ -2604,10 +2604,8 @@ fixup_newlines (fp)
return;
end = fp->buf + fp->length;
- *end = '\r';
- p = (U_CHAR *) strchr ((const char *) fp->buf, '\r');
- *end = '\0';
- if (p == end)
+ p = (U_CHAR *) memchr ((const char *) fp->buf, '\r', fp->length);
+ if (p == NULL)
return;
if (p > fp->buf && p[-1] == '\n')
OpenPOWER on IntegriCloud