From: Nathan Sidwell Date: Thu, 8 Jun 2000 08:30:28 +0000 (+0000) Subject: frame.c (end_fde_sort): Remove extraneous erratic array test. X-Git-Tag: prereleases/libstdc++-2.92~5912 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=89d7f003d32b1ce78b154f42335ee97685245b0f;p=thirdparty%2Fgcc.git frame.c (end_fde_sort): Remove extraneous erratic array test. * frame.c (end_fde_sort): Remove extraneous erratic array test. * frame.c (start_fde_sort): Don't malloc (0). From-SVN: r34452 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e129114d1e29..51e6599575d7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2000-06-08 Nathan Sidwell + + * frame.c (end_fde_sort): Remove extraneous erratic array test. + +2000-06-08 Denis Perchine + + * frame.c (start_fde_sort): Don't malloc (0). + 2000-06-07 Zack Weinberg * c-decl.c (pushdecl): Do not call COMPLETE_TYPE_P on diff --git a/gcc/frame.c b/gcc/frame.c index e1448e315f0a..399df577ff00 100644 --- a/gcc/frame.c +++ b/gcc/frame.c @@ -59,7 +59,7 @@ typedef struct fde_accumulator static inline int start_fde_sort (fde_accumulator *accu, size_t count) { - accu->linear.array = (fde **) malloc (sizeof (fde *) * count); + accu->linear.array = count ? (fde **) malloc (sizeof (fde *) * count) : NULL; accu->erratic.array = accu->linear.array ? (fde **) malloc (sizeof (fde *) * count) : NULL; accu->linear.count = 0; @@ -230,8 +230,7 @@ end_fde_sort (fde_accumulator *accu, size_t count) abort (); frame_heapsort (&accu->erratic); fde_merge (&accu->linear, &accu->erratic); - if (accu->erratic.array) - free (accu->erratic.array); + free (accu->erratic.array); } else {