summaryrefslogtreecommitdiffstats
path: root/disk-utils/mkswap.c
diff options
context:
space:
mode:
authorKarel Zak2011-03-03 15:00:30 +0100
committerKarel Zak2011-03-03 15:00:30 +0100
commit6c7d5ae9a2338be35cfab0fd8379a9f58c4f8c36 (patch)
treeb2e95024812c05b13b7102a104ff8277b61fe1f0 /disk-utils/mkswap.c
parentdocs: update TODO file (diff)
downloadkernel-qcow2-util-linux-6c7d5ae9a2338be35cfab0fd8379a9f58c4f8c36.tar.gz
kernel-qcow2-util-linux-6c7d5ae9a2338be35cfab0fd8379a9f58c4f8c36.tar.xz
kernel-qcow2-util-linux-6c7d5ae9a2338be35cfab0fd8379a9f58c4f8c36.zip
move struct option to .rodata
It does not make sense to have writable large arrays of "struct option" on the stack. Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils/mkswap.c')
-rw-r--r--disk-utils/mkswap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/disk-utils/mkswap.c b/disk-utils/mkswap.c
index 0f4ad398f..267e78e43 100644
--- a/disk-utils/mkswap.c
+++ b/disk-utils/mkswap.c
@@ -457,7 +457,7 @@ main(int argc, char **argv) {
const char *opt_uuid = NULL;
uuid_t uuid_dat;
#endif
- struct option longopts[] = {
+ static const struct option longopts[] = {
{ "check", no_argument, 0, 'c' },
{ "force", no_argument, 0, 'f' },
{ "pagesize", required_argument, 0, 'p' },