From 6366492a23c4fc1c45fb8ddbe35cb721f2c71146 Mon Sep 17 00:00:00 2001 From: Steve French Date: Thu, 29 Nov 2012 18:07:51 -0600 Subject: [PATCH] --- yaml --- r: 339471 b: refs/heads/master c: 1cc9bd68617f2a92dcd6e4398288341d16cfb5c1 h: refs/heads/master i: 339469: 3ca8dff63ff9fe088e36da813f196120587da127 339467: 184f3c310fa6fe3ddfa88cb1eeb2f2d21861775e 339463: b13c7fbb3ab712a9fb78c613ef34ed69b88e00ca 339455: 05e8cd9412bdb85ffd57ff78a13899194f70a65e v: v3 --- [refs] | 2 +- trunk/fs/cifs/cifsglob.h | 13 ++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index fcab6773a893..ecccf232a3a0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b979aaa1777259330435c47f900833dabe9189e8 +refs/heads/master: 1cc9bd68617f2a92dcd6e4398288341d16cfb5c1 diff --git a/trunk/fs/cifs/cifsglob.h b/trunk/fs/cifs/cifsglob.h index 052d85b333f3..74a07b604ffd 100644 --- a/trunk/fs/cifs/cifsglob.h +++ b/trunk/fs/cifs/cifsglob.h @@ -1064,21 +1064,16 @@ static inline char CIFS_DIR_SEP(const struct cifs_sb_info *cifs_sb) static inline void convert_delimiter(char *path, char delim) { - int i; - char old_delim; - - if (path == NULL) - return; + char old_delim, *pos; if (delim == '/') old_delim = '\\'; else old_delim = '/'; - for (i = 0; path[i] != '\0'; i++) { - if (path[i] == old_delim) - path[i] = delim; - } + pos = path; + while ((pos = strchr(pos, old_delim))) + *pos = delim; } #ifdef CONFIG_CIFS_STATS