aboutsummaryrefslogtreecommitdiff
path: root/gcc/diagnostic.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>2000-02-23 12:17:57 +0000
committerRichard Kenner <kenner@gcc.gnu.org>2000-02-23 07:17:57 -0500
commit4eda9c65825904909717aafc7d351629759b9eb7 (patch)
treef2d49feb4bb17c9334edb80a53c4f1fdb3e2c828 /gcc/diagnostic.c
parentf871e8996d57f9347dca5e55ffea5788dab411a1 (diff)
downloadgcc-4eda9c65825904909717aafc7d351629759b9eb7.zip
gcc-4eda9c65825904909717aafc7d351629759b9eb7.tar.gz
gcc-4eda9c65825904909717aafc7d351629759b9eb7.tar.bz2
* diagnostic.c (init_output_buffer): Handle case of null PREFIX.
From-SVN: r32112
Diffstat (limited to 'gcc/diagnostic.c')
-rw-r--r--gcc/diagnostic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c
index 9be1232..503bee9 100644
--- a/gcc/diagnostic.c
+++ b/gcc/diagnostic.c
@@ -152,7 +152,7 @@ init_output_buffer (buffer, prefix, max_length)
char *prefix;
int max_length;
{
- int prefix_length = strlen (prefix);
+ int prefix_length = prefix == 0 ? 0 : strlen (prefix);
obstack_init (&buffer->obstack);
buffer->prefix = prefix;