* [tarantool-patches] [PATCH] fiber: Unify sizeof operator
@ 2019-04-15 21:14 Cyrill Gorcunov
2019-04-16 17:37 ` Vladimir Davydov
0 siblings, 1 reply; 2+ messages in thread
From: Cyrill Gorcunov @ 2019-04-15 21:14 UTC (permalink / raw)
To: tml; +Cc: Cyrill Gorcunov
We use sizeof as a function in most of the overall code,
fix this nit.
---
src/lib/core/fiber.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lib/core/fiber.c b/src/lib/core/fiber.c
index 283a53d58..ce90f930c 100644
--- a/src/lib/core/fiber.c
+++ b/src/lib/core/fiber.c
@@ -1363,7 +1363,7 @@ cord_costart(struct cord *cord, const char *name, fiber_func f, void *arg)
void
cord_set_name(const char *name)
{
- snprintf(cord()->name, sizeof cord()->name, "%s", name);
+ snprintf(cord()->name, sizeof(cord()->name), "%s", name);
/* Main thread's name will replace process title in ps, skip it */
if (cord_is_main())
return;
--
2.20.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [tarantool-patches] [PATCH] fiber: Unify sizeof operator
2019-04-15 21:14 [tarantool-patches] [PATCH] fiber: Unify sizeof operator Cyrill Gorcunov
@ 2019-04-16 17:37 ` Vladimir Davydov
0 siblings, 0 replies; 2+ messages in thread
From: Vladimir Davydov @ 2019-04-16 17:37 UTC (permalink / raw)
To: Cyrill Gorcunov; +Cc: tml
On Tue, Apr 16, 2019 at 12:14:50AM +0300, Cyrill Gorcunov wrote:
> We use sizeof as a function in most of the overall code,
> fix this nit.
> ---
> src/lib/core/fiber.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/lib/core/fiber.c b/src/lib/core/fiber.c
> index 283a53d58..ce90f930c 100644
> --- a/src/lib/core/fiber.c
> +++ b/src/lib/core/fiber.c
> @@ -1363,7 +1363,7 @@ cord_costart(struct cord *cord, const char *name, fiber_func f, void *arg)
> void
> cord_set_name(const char *name)
> {
> - snprintf(cord()->name, sizeof cord()->name, "%s", name);
> + snprintf(cord()->name, sizeof(cord()->name), "%s", name);
> /* Main thread's name will replace process title in ps, skip it */
> if (cord_is_main())
> return;
Trivial. Pushed to master.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-04-16 17:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-15 21:14 [tarantool-patches] [PATCH] fiber: Unify sizeof operator Cyrill Gorcunov
2019-04-16 17:37 ` Vladimir Davydov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox