summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÁkos Uzonyi <uzonyi.akos@gmail.com>2020-07-17 23:24:36 +0200
committerUzonyi Ákos <uzonyi.akos@gmail.com>2020-07-21 11:52:55 +0200
commit03d9f49c3187a9be7b337f2cd863fa3a10ad7e7b (patch)
tree978f7207f6c08d797025bc258805e9dde8247048
parent2ce9e7ec85182c9cee9e599acd67ce0b6cfea9de (diff)
downloadstrace-03d9f49c3187a9be7b337f2cd863fa3a10ad7e7b.tar.gz
Remove tcb parameter of read_int_from_file
* defs.h (read_int_from_file): Remove tcb parameter. * util.c (read_int_from_file): Likewise. * msghdr.c (get_optmem_max): Remove tcb parameter of read_int_from_file.
-rw-r--r--defs.h2
-rw-r--r--msghdr.c2
-rw-r--r--util.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/defs.h b/defs.h
index 01b3c9b01..21f8775d2 100644
--- a/defs.h
+++ b/defs.h
@@ -498,7 +498,7 @@ extern unsigned os_release;
# undef KERNEL_VERSION
# define KERNEL_VERSION(a, b, c) (((a) << 16) + ((b) << 8) + (c))
-extern int read_int_from_file(struct tcb *, const char *, int *);
+extern int read_int_from_file(const char *, int *);
extern void set_sortby(const char *);
extern int set_overhead(const char *);
diff --git a/msghdr.c b/msghdr.c
index becbb5124..1ab4c6e23 100644
--- a/msghdr.c
+++ b/msghdr.c
@@ -293,7 +293,7 @@ get_optmem_max(struct tcb *tcp)
static int optmem_max;
if (!optmem_max) {
- if (read_int_from_file(tcp, "/proc/sys/net/core/optmem_max",
+ if (read_int_from_file("/proc/sys/net/core/optmem_max",
&optmem_max) || optmem_max <= 0) {
optmem_max = sizeof(long long) * (2 * IOV_MAX + 512);
} else {
diff --git a/util.c b/util.c
index cde76c130..286c69031 100644
--- a/util.c
+++ b/util.c
@@ -1517,7 +1517,7 @@ print_abnormal_hi(const kernel_ulong_t val)
}
int
-read_int_from_file(struct tcb *tcp, const char *const fname, int *const pvalue)
+read_int_from_file(const char *const fname, int *const pvalue)
{
const int fd = open_file(fname, O_RDONLY);
if (fd < 0)