diff options
author | Timo Teräs <timo.teras@iki.fi> | 2020-05-04 21:45:11 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2020-05-06 13:05:25 +0300 |
commit | 1d7123d83796182f851ccccaf056063955343718 (patch) | |
tree | ca675fd3363af3584694d0db5a3b65e618ae894b /src/help.c | |
parent | 791f93fcbe7a543e0bb844887ba395be8ed8ea44 (diff) | |
download | apk-tools-1d7123d83796182f851ccccaf056063955343718.tar.gz apk-tools-1d7123d83796182f851ccccaf056063955343718.tar.bz2 apk-tools-1d7123d83796182f851ccccaf056063955343718.tar.xz apk-tools-1d7123d83796182f851ccccaf056063955343718.zip |
rewrite option descriptors to be single string
This reduces the number of relocations on PIE binaries, and also
reduces the executable size. Parsing of the options is slightly
sped up as only the exact matching option group parser is called.
Diffstat (limited to 'src/help.c')
-rw-r--r-- | src/help.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -17,7 +17,7 @@ static int is_group(struct apk_applet *applet, const char *topic) if (!applet) return strcasecmp(topic, "apk") == 0; if (strcasecmp(topic, applet->name) == 0) return 1; for (int i = 0; applet->optgroups[i] && i < ARRAY_SIZE(applet->optgroups); i++) - if (strcasecmp(applet->optgroups[i]->name, topic) == 0) return 1; + if (strcasecmp(applet->optgroups[i]->desc, topic) == 0) return 1; return 0; } |