Blame SOURCES/0128-Remove-tcb-parameter-of-read_int_from_file.patch

b4ec74
From 924f71a4296be54e109784dfdb487b732bfc9bbf Mon Sep 17 00:00:00 2001
b4ec74
From: =?UTF-8?q?=C3=81kos=20Uzonyi?= <uzonyi.akos@gmail.com>
b4ec74
Date: Fri, 17 Jul 2020 23:24:36 +0200
b4ec74
Subject: [PATCH 128/138] Remove tcb parameter of read_int_from_file
b4ec74
b4ec74
* defs.h (read_int_from_file): Remove tcb parameter.
b4ec74
* util.c (read_int_from_file): Likewise.
b4ec74
* msghdr.c (get_optmem_max): Remove tcb parameter of read_int_from_file.
b4ec74
---
b4ec74
 defs.h   | 2 +-
b4ec74
 msghdr.c | 2 +-
b4ec74
 util.c   | 2 +-
b4ec74
 3 files changed, 3 insertions(+), 3 deletions(-)
b4ec74
b4ec74
diff --git a/defs.h b/defs.h
b4ec74
index d8bd513..dae1cd9 100644
b4ec74
--- a/defs.h
b4ec74
+++ b/defs.h
b4ec74
@@ -498,7 +498,7 @@ extern unsigned os_release;
b4ec74
 # undef KERNEL_VERSION
b4ec74
 # define KERNEL_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c))
b4ec74
 
b4ec74
-extern int read_int_from_file(struct tcb *, const char *, int *);
b4ec74
+extern int read_int_from_file(const char *, int *);
b4ec74
 
b4ec74
 extern void set_sortby(const char *);
b4ec74
 extern int set_overhead(const char *);
b4ec74
diff --git a/msghdr.c b/msghdr.c
b4ec74
index becbb51..1ab4c6e 100644
b4ec74
--- a/msghdr.c
b4ec74
+++ b/msghdr.c
b4ec74
@@ -293,7 +293,7 @@ get_optmem_max(struct tcb *tcp)
b4ec74
 	static int optmem_max;
b4ec74
 
b4ec74
 	if (!optmem_max) {
b4ec74
-		if (read_int_from_file(tcp, "/proc/sys/net/core/optmem_max",
b4ec74
+		if (read_int_from_file("/proc/sys/net/core/optmem_max",
b4ec74
 				       &optmem_max) || optmem_max <= 0) {
b4ec74
 			optmem_max = sizeof(long long) * (2 * IOV_MAX + 512);
b4ec74
 		} else {
b4ec74
diff --git a/util.c b/util.c
b4ec74
index cde76c1..286c690 100644
b4ec74
--- a/util.c
b4ec74
+++ b/util.c
b4ec74
@@ -1517,7 +1517,7 @@ print_abnormal_hi(const kernel_ulong_t val)
b4ec74
 }
b4ec74
 
b4ec74
 int
b4ec74
-read_int_from_file(struct tcb *tcp, const char *const fname, int *const pvalue)
b4ec74
+read_int_from_file(const char *const fname, int *const pvalue)
b4ec74
 {
b4ec74
 	const int fd = open_file(fname, O_RDONLY);
b4ec74
 	if (fd < 0)
b4ec74
-- 
b4ec74
2.1.4
b4ec74