Skip to contentSkip to conversation

fs-befs-btreec-replace-strncpy-by-strlcpy-coding-style-fixing.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jun 9, 2014 Befs file system

lore
Share & tools
lore
#0 lore raw

Subject: [merged] fs-befs-btreec-replace-strncpy-by-strlcpy-coding-style-fixing.patch removed from -mm tree
To: [email protected],[email protected]
From: [email protected]
Date: Mon, 09 Jun 2014 12:31:07 -0700

The patch titled
Subject: fs/befs/btree.c: replace strncpy by strlcpy + coding style fixing
has been removed from the -mm tree. Its filename was
fs-befs-btreec-replace-strncpy-by-strlcpy-coding-style-fixing.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Fabian Frederick <[email protected]>
Subject: fs/befs/btree.c: replace strncpy by strlcpy + coding style fixing

- strncpy + end of string assignement replaced by strlcpy

- Fix endif };

- Fix typo

---

 fs/befs/btree.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
fs/befs/btree.c renamed from fs/befs/btree.c~fs-befs-btreec-replace-strncpy-by-strlcpy-coding-style-fixing +3 -4
diff -puN fs/befs/btree.c~fs-befs-btreec-replace-strncpy-by-strlcpy-coding-style-fixing fs/befs/btree.c
@@ -405,7 +405,7 @@ befs_find_key(struct super_block *sb, be
  * Heres how it works: Key_no is the index of the key/value pair to 
  * return in keybuf/value.
  * Bufsize is the size of keybuf (BEFS_NAME_LEN+1 is a good size). Keysize is 
- * the number of charecters in the key (just a convenience).
+ * the number of characters in the key (just a convenience).
  *
  * Algorithm:
  *   Get the first leafnode of the tree. See if the requested key is in that
@@ -502,12 +502,11 @@ befs_btree_read(struct super_block *sb,
 			   "for key of size %d", __func__, bufsize, keylen);
 		brelse(this_node->bh);
 		goto error_alloc;
-	};
+	}
 
-	strncpy(keybuf, keystart, keylen);
+	strlcpy(keybuf, keystart, keylen + 1);
 	*value = fs64_to_cpu(sb, valarray[cur_key]);
 	*keysize = keylen;
-	keybuf[keylen] = '\0';
 
 	befs_debug(sb, "Read [%llu,%d]: Key \"%.*s\", Value %llu", node_off,
 		   cur_key, keylen, keybuf, *value);

_

Patches currently in -mm which might be from [email protected] are

origin.patch
fs-cifs-remove-obsolete-__constant.patch kernel-posix-timersc-code-clean-up.patch kernel-posix-timersc-code-clean-up-checkpatch-fixes.patch fs-ext4-fsyncc-generic_file_fsync-call-based-on-barrier-flag.patch fs-isofs-logging-clean-up.patch
linux-next.patch kernel-watchdogc-convert-printk-pr_warning-to-pr_foo.patch init-mainc-code-clean-up.patch kernel-kprobesc-convert-printk-to-pr_foo.patch