Skip to content

Commit

Permalink
Wrong sense of need compared to have.
Browse files Browse the repository at this point in the history
  • Loading branch information
steve committed Mar 6, 2003
1 parent ef47ea3 commit 9c973ef
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions t-dll-api.cc
Expand Up @@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
#ifdef HAVE_CVS_IDENT
#ident "$Id: t-dll-api.cc,v 1.94 2003/03/06 01:24:37 steve Exp $"
#ident "$Id: t-dll-api.cc,v 1.95 2003/03/06 04:32:40 steve Exp $"
#endif

# include "config.h"
Expand Down Expand Up @@ -160,7 +160,7 @@ extern "C" const char* ivl_event_name(ivl_event_t net)
const char*sn = ivl_scope_name(scope);

unsigned need = strlen(sn) + 1 + strlen(net->name) + 1;
if (need < name_size) {
if (need > name_size) {
name_buffer = (char*)realloc(name_buffer, need);
name_size = need;
}
Expand Down Expand Up @@ -775,7 +775,7 @@ extern "C" const char* ivl_lpm_name(ivl_lpm_t net)
const char*sn = ivl_scope_name(scope);

unsigned need = strlen(sn) + 1 + strlen(net->name) + 1;
if (need < name_size) {
if (need > name_size) {
name_buffer = (char*)realloc(name_buffer, need);
name_size = need;
}
Expand Down Expand Up @@ -1752,6 +1752,9 @@ extern "C" ivl_variable_type_t ivl_variable_type(ivl_variable_t net)

/*
* $Log: t-dll-api.cc,v $
* Revision 1.95 2003/03/06 04:32:40 steve
* Wrong sense of need compared to have.
*
* Revision 1.94 2003/03/06 01:24:37 steve
* Obsolete the ivl_event_name function.
*
Expand Down

0 comments on commit 9c973ef

Please sign in to comment.