* as/link/lklibr.c:
[fw/sdcc] / as / link / lklibr.c
index c59becceaf0c1d0eb4094e3b52772e99bd2a0766..b15fd8a8b70769b20ced4889881d9a98efc6f5a3 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
@@ -741,7 +740,7 @@ fndsym (const char *name)
    */
   for (lbnh = lbnhead; lbnh; lbnh = lbnh->next)
     {
-      int ret;
+      int ret = 0;
 
       if ((libfp = fopen (lbnh->libspc, "rb")) == NULL)
         {
@@ -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;