fixed test if symbol was found in fndsym()
authorborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 2 Jan 2009 22:01:12 +0000 (22:01 +0000)
committerborutr <borutr@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 2 Jan 2009 22:01:12 +0000 (22:01 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@5320 4a8a32a2-be11-0410-ad9d-d568d2c75423

as/link/lklibr.c

index c59becceaf0c1d0eb4094e3b52772e99bd2a0766..af0505a29ab5c37a66cb5165aa3450b5e0ff136c 100644 (file)
@@ -19,8 +19,6 @@
  * Extensions: P. Felber
  */
 
-#define EQ(A,B) !strcmp((A),(B))
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -50,6 +48,7 @@
  *
  */
 
+#define EQ(A,B) !strcmp((A),(B))
 #define NELEM(x) (sizeof (x) / sizeof (*x))
 
 #ifdef INDEXLIB
@@ -763,8 +762,8 @@ fndsym (const char *name)
 
       fclose (libfp);
 
-      if (!ret)
-        break;
+      if (ret)
+        return 1;
 
     }                           /* Ends good open of libr file */
   return 0;