strchr and strrchr are macros when compiling with optimisation in gcc, so we can...
[kai/samba-autobuild/.git] / source3 / printing / print_svid.c
index 301f38867195bfd4936ed66f76783f0a9f3c2e2d..22ddbe70b95437a409e51d66f1d6e84b7643e8bc 100644 (file)
@@ -59,8 +59,8 @@ static void populate_printers(void)
                char *buf = lines[i];
 
                /* eat "system/device for " */
-               if (((tmp = strchr(buf, ' ')) == NULL) ||
-                   ((tmp = strchr(++tmp, ' ')) == NULL))
+               if (((tmp = strchr_m(buf, ' ')) == NULL) ||
+                   ((tmp = strchr_m(++tmp, ' ')) == NULL))
                        continue;
 
                /*
@@ -68,13 +68,13 @@ static void populate_printers(void)
                 */
 
                if(!strncmp("for ",++tmp,4)) {
-                       tmp=strchr(tmp, ' ');
+                       tmp=strchr_m(tmp, ' ');
                        tmp++;
                }
                name = tmp;
 
                /* truncate the ": ..." */
-               if ((tmp = strchr(name, ':')) != NULL)
+               if ((tmp = strchr_m(name, ':')) != NULL)
                        *tmp = '\0';
                
                /* add it to the cache */