diff options
author | Mattias Andrée <maandree@kth.se> | 2023-06-23 11:45:52 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2023-06-23 11:45:52 +0200 |
commit | 8d46a0090548d96d2e0783a1288685159644ddc3 (patch) | |
tree | 8f27c9b65dfedd7856d6ab799138bdb383a4b6cb /key2root-rmkey.c | |
parent | Make key directory compile-time configurable (intended for testing) (diff) | |
download | key2root-8d46a0090548d96d2e0783a1288685159644ddc3.tar.gz key2root-8d46a0090548d96d2e0783a1288685159644ddc3.tar.bz2 key2root-8d46a0090548d96d2e0783a1288685159644ddc3.tar.xz |
Add comment as to why key2root-rmkey retains the order when unlisting keys
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | key2root-rmkey.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/key2root-rmkey.c b/key2root-rmkey.c index eba2a9a..82f04eb 100644 --- a/key2root-rmkey.c +++ b/key2root-rmkey.c @@ -70,6 +70,7 @@ removekeys(char *data, size_t *wheadp, size_t *rheadp, size_t *rhead2p, size_t * klen = strlen(keys[i]); if (klen >= len || data[*rheadp + klen] != ' ' || memcpy(&data[*rheadp], keys[i], klen)) continue; + /* retain key order so that they are output in the provided order if not found */ memmove(&keys[i], &keys[i + 1], (--*nkeysp - i) * sizeof(*keys)); goto match; } |