rt-tests/SOURCES/rt-numa-Correct-the-comment-of-numa_initialize.patch
2022-01-19 21:24:46 +00:00

31 lines
985 B
Diff

From d83bc06e1fca7250dbc3c5e7be0f55a4ea6e7ef0 Mon Sep 17 00:00:00 2001
From: Oscar Shiang <oscar0225@livemail.tw>
Date: Thu, 23 Dec 2021 22:01:07 +0800
Subject: [PATCH 1/2] rt-numa: Correct the comment of numa_initialize()
numa_initialize() returns 0 only when numa_available() returns -1,
which means that libnuma is unavailable.
The return values in the comment should be corrected to 1 if all
functions are available and 0 when the functions are unavailable.
Signed-off-by: Oscar Shiang <oscar0225@livemail.tw>
Signed-off-by: John Kacur <jkacur@redhat.com>
diff --git a/src/lib/rt-numa.c b/src/lib/rt-numa.c
index bb0121a65eca..ee5ab99684d8 100644
--- a/src/lib/rt-numa.c
+++ b/src/lib/rt-numa.c
@@ -15,7 +15,7 @@
/*
* numa_available() must be called before any other calls to the numa library
- * returns 0 if numa is available, or 1 if numa is not available
+ * returns 1 if numa is available, or 0 if numa is not available
*/
int numa_initialize(void)
{
--
2.27.0