Skip to contentSkip to conversation

misuse of strstr

PATCH In review Al Viro 2 participants 2 messages Oct 11, 2006 GFS2 file system

lore
Share & tools
lore

Al Viro

author
#0 lore raw

PATCH 1/1 misuse of strstr

---
 fs/gfs2/locking/dlm/mount.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/gfs2/locking/dlm/mount.c +1 -1
index 1f94dd3..cdd1694 100644
@@ -45,7 +45,7 @@ static struct gdlm_ls *init_gdlm(lm_call
 	strncpy(buf, table_name, 256);
 	buf[255] = '\0';
 
-	p = strstr(buf, ":");
+	p = strchr(buf, ':');
 	if (!p) {
 		log_info("invalid table_name \"%s\"", table_name);
 		kfree(ls);
Signature · 1 line
1.4.2.GIT
#1 lore raw

fs/gfs2/locking/dlm/mount.c static struct gdlm_ls *init_gdlm(lm_call · line 48

Quoted 8 lines
fs/gfs2/locking/dlm/mount.c +1 -1
@@ -45,7 +45,7 @@ static struct gdlm_ls *init_gdlm(lm_call
 	strncpy(buf, table_name, 256);
 	buf[255] = '\0';
 
-	p = strstr(buf, ":");
+	p = strchr(buf, ':');

arch/mips/arc/cmdline.c:55: s = strstr(prom_argv(actr), "=");

sorry for absence of patch, I'm on wonders of BY dial-up _and_ Gmail web interface right now.