summary refs log tree commit diff
path: root/amd64/sysv.c
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-11-20 00:20:21 -0800
committerQuentin Carbonneaux <quentin@c9x.me>2019-11-25 20:40:33 +0100
commit190263f1b628ba3171309147120fd3ba0e370b42 (patch)
treef28db431972eb328fe56fa0b8df07cf9f263c672 /amd64/sysv.c
parent7bf08ff50729037c8820b26d085905175b5593c8 (diff)
downloadroux-190263f1b628ba3171309147120fd3ba0e370b42.tar.gz
copy: Fix use of compound literal outside its scope
C99 6.5.2.5p6:
> If the compound literal occurs outside the body of a function,
> the object has static storage duration; otherwise, it has automatic
> storage duration associated with the enclosing block.

So, we can't use the address of a compound literal here. Instead,
just set p to NULL, and make the loop conditional on p being non-NULL.

Remarks from Quentin:

I made a cosmetic change to Michael's
original patch and merely pushed the
literal at toplevel.
Diffstat (limited to 'amd64/sysv.c')
0 files changed, 0 insertions, 0 deletions