Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1300379 > unrolled thread
| Started by | Toralf Förster <toralf.foerster@gmx.de> |
|---|---|
| First post | 2016-01-03 21:00 +0100 |
| Last post | 2016-01-06 10:30 +0100 |
| Articles | 3 — 3 participants |
Back to article view | Back to linux.kernel
[PATCH 1/2] ext4: use XATTR_*_PREFIX_LEN instead sizeof(...) Toralf Förster <toralf.foerster@gmx.de> - 2016-01-03 21:00 +0100
Re: [PATCH 1/2] ext4: use XATTR_*_PREFIX_LEN instead sizeof(...) Jan Kara <jack@suse.cz> - 2016-01-05 18:20 +0100
Re: [PATCH 1/2] ext4: use XATTR_*_PREFIX_LEN instead sizeof(...) José Bollo <jobol@nonadev.net> - 2016-01-06 10:30 +0100
| From | Toralf Förster <toralf.foerster@gmx.de> |
|---|---|
| Date | 2016-01-03 21:00 +0100 |
| Subject | [PATCH 1/2] ext4: use XATTR_*_PREFIX_LEN instead sizeof(...) |
| Message-ID | <qMWYO-1kX-17@gated-at.bofh.it> |
use the definition in include/uapi/linux/xattr.h
Signed-off-by: Toralf Förster <toralf.foerster@gmx.de>
---
fs/ext4/xattr_security.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ext4/xattr_security.c b/fs/ext4/xattr_security.c
index 36f4c1a..1a3d629 100644
--- a/fs/ext4/xattr_security.c
+++ b/fs/ext4/xattr_security.c
@@ -16,7 +16,7 @@ ext4_xattr_security_list(const struct xattr_handler *handler,
struct dentry *dentry, char *list, size_t list_size,
const char *name, size_t name_len)
{
- const size_t prefix_len = sizeof(XATTR_SECURITY_PREFIX)-1;
+ const size_t prefix_len = XATTR_SECURITY_PREFIX_LEN;
const size_t total_len = prefix_len + name_len + 1;
--
2.4.10
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Jan Kara <jack@suse.cz> |
|---|---|
| Date | 2016-01-05 18:20 +0100 |
| Message-ID | <qNDr4-5S2-11@gated-at.bofh.it> |
| In reply to | #1300379 |
On Sun 03-01-16 20:56:37, Toralf Förster wrote:
> use the definition in include/uapi/linux/xattr.h
>
> Signed-off-by: Toralf Förster <toralf.foerster@gmx.de>
Looks good. You can add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
> ---
> fs/ext4/xattr_security.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ext4/xattr_security.c b/fs/ext4/xattr_security.c
> index 36f4c1a..1a3d629 100644
> --- a/fs/ext4/xattr_security.c
> +++ b/fs/ext4/xattr_security.c
> @@ -16,7 +16,7 @@ ext4_xattr_security_list(const struct xattr_handler *handler,
> struct dentry *dentry, char *list, size_t list_size,
> const char *name, size_t name_len)
> {
> - const size_t prefix_len = sizeof(XATTR_SECURITY_PREFIX)-1;
> + const size_t prefix_len = XATTR_SECURITY_PREFIX_LEN;
> const size_t total_len = prefix_len + name_len + 1;
>
>
> --
> 2.4.10
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | José Bollo <jobol@nonadev.net> |
|---|---|
| Date | 2016-01-06 10:30 +0100 |
| Message-ID | <qNSzN-7E8-17@gated-at.bofh.it> |
| In reply to | #1300379 |
I prefer the use of sizeof that can't be faked even by error but why not
Le dimanche 03 janvier 2016 à 20:56 +0100, Toralf Förster a écrit :
> use the definition in include/uapi/linux/xattr.h
>
> Signed-off-by: Toralf Förster <toralf.foerster@gmx.de>
> ---
> fs/ext4/xattr_security.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ext4/xattr_security.c b/fs/ext4/xattr_security.c
> index 36f4c1a..1a3d629 100644
> --- a/fs/ext4/xattr_security.c
> +++ b/fs/ext4/xattr_security.c
> @@ -16,7 +16,7 @@ ext4_xattr_security_list(const struct xattr_handler *handler,
> struct dentry *dentry, char *list, size_t list_size,
> const char *name, size_t name_len)
> {
> - const size_t prefix_len = sizeof(XATTR_SECURITY_PREFIX)-1;
> + const size_t prefix_len = XATTR_SECURITY_PREFIX_LEN;
> const size_t total_len = prefix_len + name_len + 1;
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web