git: 5dbfe9631dc1 - stable/14 - tools/fib_multibind: Remove a redundant calculation

From: Mark Johnston <markj_at_FreeBSD.org>
Date: Fri, 21 Feb 2025 01:57:27 UTC
The branch stable/14 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=5dbfe9631dc1a5539f5021ed68698878624d051e

commit 5dbfe9631dc1a5539f5021ed68698878624d051e
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2025-02-14 15:16:52 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2025-02-21 01:04:50 +0000

    tools/fib_multibind: Remove a redundant calculation
    
    No functional change intended.
    
    Reported by:    kevans
    Fixes:          3fa552149885 ("tools: Add a small program to demonstrate FIB handling in bind(2)")
    Sponsored by:   Klara, Inc.
    Sponsored by:   Stormshield
    
    (cherry picked from commit d46d45bf4b196cd2daba42d5413f8e4d7ffedeed)
---
 tools/tools/fib_multibind/sink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/tools/fib_multibind/sink.c b/tools/tools/fib_multibind/sink.c
index fe93a66fe266..8f8c31f0c8ea 100644
--- a/tools/tools/fib_multibind/sink.c
+++ b/tools/tools/fib_multibind/sink.c
@@ -158,7 +158,7 @@ main(int argc, char **argv)
 		sc.nfibs = 1;
 	}
 
-	sc.fds = calloc(all ? sc.nfibs : 1, sizeof(int));
+	sc.fds = calloc(sc.nfibs, sizeof(int));
 	if (sc.fds == NULL)
 		err(1, "calloc");
 	for (int i = 0; i < sc.nfibs; i++) {