From b2b6ab8eff317f6a507ab23897ea6cd5c718d99a Mon Sep 17 00:00:00 2001 From: Yaniv Kaul Date: Thu, 2 Aug 2018 16:02:33 +0300 Subject: All: remove memset() before sprintf() It's not needed. There's a good chance the compiler is smart enough to remove it anyway, but it can't hurt - I hope. Compile-tested only! Change-Id: Id7c054e146ba630227affa591007803f3046416b updates: bz#1193929 Signed-off-by: Yaniv Kaul --- xlators/cluster/stripe/src/stripe-helpers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/cluster/stripe/src') diff --git a/xlators/cluster/stripe/src/stripe-helpers.c b/xlators/cluster/stripe/src/stripe-helpers.c index 06568389cc2..18f70fe6d7e 100644 --- a/xlators/cluster/stripe/src/stripe-helpers.c +++ b/xlators/cluster/stripe/src/stripe-helpers.c @@ -261,7 +261,7 @@ stripe_fill_pathinfo_xattr (xlator_t *this, stripe_local_t *local, goto out; } - (void) snprintf (stripe_size_str, 20, "%"PRId64, + (void) snprintf (stripe_size_str, sizeof (stripe_size_str), "%"PRId64, (long long) (local->fctx) ? local->fctx->stripe_size : 0); /* extra bytes for decorations (brackets and <>'s) */ -- cgit