# HG changeset patch # User lost@l-w.ca # Date 1314423360 21600 # Node ID 729a9c70934e889407c9542fbb3930c41010eb53 # Parent 08fb11004df908cf026d339acbc44678c7e3c648 Fixed crash and bogus warning with os9 module target diff -r 08fb11004df9 -r 729a9c70934e lwlink/link.c --- a/lwlink/link.c Fri Aug 26 23:26:00 2011 -0600 +++ b/lwlink/link.c Fri Aug 26 23:36:00 2011 -0600 @@ -500,7 +500,8 @@ if (found != 1) { rval = NULL; - fprintf(stderr, "Warning: multiple instances of section %s found; ignoring all of them which is probably not what you want\n", name); + if (found > 1) + fprintf(stderr, "Warning: multiple instances of section %s found; ignoring all of them which is probably not what you want\n", name); } return rval; } @@ -537,7 +538,7 @@ linkscript.name = (char *)(s -> code); } - for (sym = s -> localsyms; s; sym = sym -> next) + for (sym = s -> localsyms; sym; sym = sym -> next) { char *sm = (char *)(sym -> sym); if (!strcasecmp(sm, "type"))