]> git.ipfire.org Git - thirdparty/util-linux.git/commit
setarch: don't return address of automatic variable
authorAndreas Schwab <schwab@linux-m68k.org>
Sat, 19 Jan 2019 22:18:16 +0000 (23:18 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 22 Jan 2019 11:02:16 +0000 (12:02 +0100)
commit33e87bf1524baa215413cbcb26668e600a7b5cb8
tree137b2f89cf9c9abdc39da14556e91d37bc098077
parent014e7eb321f22cf5f55505704501d4b605d9d256
setarch: don't return address of automatic variable

On architectures without special personalities setarch uses the contents
of a local variable with automatic storage duration after return from
the function, causing it to report a spurious error.

$ setarch m68k
setarch: Kernel cannot set architecture to m68k

Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
sys-utils/setarch.c