diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 10:28:32 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 10:28:32 +0000 |
commit | 3bf52aa2a3937316cecd2ef504c01dbca030b650 (patch) | |
tree | 66355147ca12f283fab0f026ac9335ea57d9c205 /debian/patches/upstream/wall-fix-calloc-cal-Werror-calloc-transposed-args.patch | |
parent | Adding debian version 2.38.1-5. (diff) | |
download | util-linux-debian.tar.xz util-linux-debian.zip |
Adding debian version 2.38.1-5+deb12u1.debian/2.38.1-5+deb12u1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/upstream/wall-fix-calloc-cal-Werror-calloc-transposed-args.patch')
-rw-r--r-- | debian/patches/upstream/wall-fix-calloc-cal-Werror-calloc-transposed-args.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/debian/patches/upstream/wall-fix-calloc-cal-Werror-calloc-transposed-args.patch b/debian/patches/upstream/wall-fix-calloc-cal-Werror-calloc-transposed-args.patch new file mode 100644 index 0000000..1c2dc92 --- /dev/null +++ b/debian/patches/upstream/wall-fix-calloc-cal-Werror-calloc-transposed-args.patch @@ -0,0 +1,27 @@ +From: Karel Zak <kzak@redhat.com> +Date: Wed, 17 Jan 2024 12:37:08 +0100 +Subject: wall: fix calloc cal [-Werror=calloc-transposed-args] + +term-utils/wall.c:143:37: error: xcalloc sizes specified with sizeof in the earlier argument and not in the later argument [-Werror=calloc-transposed-args] + 143 | buf->groups = xcalloc(sizeof(*buf->groups), buf->ngroups); + | ^ +term-utils/wall.c:143:37: note: earlier argument should specify number of elements, later size of each element + +Signed-off-by: Karel Zak <kzak@redhat.com> +--- + term-utils/wall.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/term-utils/wall.c b/term-utils/wall.c +index 377db45..85c006a 100644 +--- a/term-utils/wall.c ++++ b/term-utils/wall.c +@@ -135,7 +135,7 @@ static struct group_workspace *init_group_workspace(const char *group) + + buf->requested_group = get_group_gid(group); + buf->ngroups = sysconf(_SC_NGROUPS_MAX) + 1; /* room for the primary gid */ +- buf->groups = xcalloc(sizeof(*buf->groups), buf->ngroups); ++ buf->groups = xcalloc(buf->ngroups, sizeof(*buf->groups)); + + return buf; + } |