diff options
author | 2024-06-27 14:26:27 +0100 | |
---|---|---|
committer | 2024-06-27 14:26:27 +0100 | |
commit | 33d5c19549aa60568dbc6c9faf6f426f7193fbd1 (patch) | |
tree | a8a065b4eb0094f27b0211ff8a33847b57f2f739 | |
parent | Add the trueof_all() and trueof_any() functions (diff) | |
download | gentoo-functions-33d5c19549aa60568dbc6c9faf6f426f7193fbd1.tar.gz gentoo-functions-33d5c19549aa60568dbc6c9faf6f426f7193fbd1.tar.bz2 gentoo-functions-33d5c19549aa60568dbc6c9faf6f426f7193fbd1.zip |
Don't explicitly assign the empty string in is_subset()
While it is correct to do so, the key may be created without assignment.
Signed-off-by: Kerin Millar <kfm@plushkava.net>
-rw-r--r-- | functions.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/functions.sh b/functions.sh index afc170a..faf9d64 100644 --- a/functions.sh +++ b/functions.sh @@ -235,7 +235,7 @@ is_subset() if (word == ENVIRON["SENTINEL"]) { break } else { - set1[word] = "" + set1[word] } } if (i == 1 || argc - i < 2) { @@ -243,7 +243,7 @@ is_subset() } for (i++; i < argc; i++) { word = ARGV[i] - set2[word] = "" + set2[word] } for (word in set2) { delete set1[word] |