Sfoglia il codice sorgente

[PATCH] misuse of strstr

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Al Viro 19 anni fa
parent
commit
4b4fcaa1a9
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      fs/gfs2/locking/dlm/mount.c

+ 1 - 1
fs/gfs2/locking/dlm/mount.c

@@ -45,7 +45,7 @@ static struct gdlm_ls *init_gdlm(lm_callback_t cb, struct gfs2_sbd *sdp,
 	strncpy(buf, table_name, 256);
 	strncpy(buf, table_name, 256);
 	buf[255] = '\0';
 	buf[255] = '\0';
 
 
-	p = strstr(buf, ":");
+	p = strchr(buf, ':');
 	if (!p) {
 	if (!p) {
 		log_info("invalid table_name \"%s\"", table_name);
 		log_info("invalid table_name \"%s\"", table_name);
 		kfree(ls);
 		kfree(ls);