strchr and strrchr are macros when compiling with optimisation in gcc, so we can...
[gd/samba/.git] / source / smbd / open.c
index 7c48e28138b63f04ee5f54701417501d330b4fab..858a26191f97cfa949113595fd124dfa78cd42eb 100644 (file)
@@ -42,7 +42,7 @@ static int fd_open(struct connection_struct *conn, char *fname,
 
        /* Fix for files ending in '.' */
        if((fd == -1) && (errno == ENOENT) &&
-          (strchr(fname,'.')==NULL)) {
+          (strchr_m(fname,'.')==NULL)) {
                pstrcat(fname,".");
                fd = conn->vfs_ops.open(conn,fname,flags,mode);
        }
@@ -245,7 +245,7 @@ return True if the filename is one of the special executable types
 ********************************************************************/
 static BOOL is_executable(const char *fname)
 {
-       if ((fname = strrchr(fname,'.'))) {
+       if ((fname = strrchr_m(fname,'.'))) {
                if (strequal(fname,".com") ||
                    strequal(fname,".dll") ||
                    strequal(fname,".exe") ||