Warning when libfile not found and path is null
[fw/sdcc] / as / mcs51 / lklibr.c
index e880d7a6e23e164dbbdb7f74a902fef80ab16d0a..d7d9cb249049701b180007462fd179ccc4d31712 100644 (file)
@@ -126,13 +126,17 @@ addlib()
 
        unget(getnb());
 
-       if (lbphead == NULL) {
-               addfile(NULL,ip);
-               return;
-       }       
-       for (lbph=lbphead; lbph; lbph=lbph->next) {
-               foundcount+=addfile(lbph->path,ip);
+       if (lbphead == NULL)
+    {
+               foundcount+=addfile(NULL,ip);
        }
+    else
+    {
+           for (lbph=lbphead; lbph; lbph=lbph->next)
+        {
+                   foundcount+=addfile(lbph->path,ip);
+           }
+    }
     if(foundcount==0)
     {
         printf("?ASlink-Warning-Couldn't find library '%s'\n", ip);