ppcrcd/yaboot/lib/strstr.c

sparky cvs at pld-linux.org
Fri Dec 9 17:12:17 CET 2005


Author: sparky
Date: Fri Dec  9 17:12:08 2005
New Revision: 6628

Modified:
   ppcrcd/yaboot/lib/strstr.c
Log:
- gcc 4 fix


Modified: ppcrcd/yaboot/lib/strstr.c
==============================================================================
--- ppcrcd/yaboot/lib/strstr.c	(original)
+++ ppcrcd/yaboot/lib/strstr.c	Fri Dec  9 17:12:08 2005
@@ -65,8 +65,18 @@
         {
           register chartype a;
 	  register const unsigned char *rhaystack, *rneedle;
+	  
+	  a = *++haystack;
+	  if (a == '\0')
+	      goto ret0;
+	  if (a == b)
+              break;
+	  a = *++haystack;
+	  if (a == '\0')
+              goto ret0;
 
-	  do
+	 do {
+	  while (a != b)
 	    {
 	      a = *++haystack;
 	      if (a == '\0')
@@ -76,15 +86,13 @@
 	      a = *++haystack;
 	      if (a == '\0')
 		goto ret0;
-shloop:	    }
-          while (a != b);
+	    }
 
 jin:	  a = *++haystack;
 	  if (a == '\0')
 	    goto ret0;
 
-	  if (a != c)
-	    goto shloop;
+	} while ( a != c );
 
 	  rhaystack = haystack-- + 1;
 	  rneedle = needle;



More information about the pld-cvs-commit mailing list