diff options
author | Sander Vrijders <[email protected]> | 2018-06-01 17:31:12 +0200 |
---|---|---|
committer | Dimitri Staessens <[email protected]> | 2018-06-01 17:36:34 +0200 |
commit | 3fe8431c5044e1337be78d82446d107299106919 (patch) | |
tree | 52e11e2a518f52a5bfee4e4b0c017dc5c20a9ac8 /src | |
parent | 1bf6419b10bdde83337b9c501821aed84c53e69b (diff) | |
download | ouroboros-3fe8431c5044e1337be78d82446d107299106919.tar.gz ouroboros-3fe8431c5044e1337be78d82446d107299106919.zip |
tools: Fix bad wildcard match in irm tool
The pattern was matched to the string instead of the string to the
pattern, which means it only worked if it was a perfect match.
Signed-off-by: Sander Vrijders <[email protected]>
Signed-off-by: Dimitri Staessens <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/tools/irm/irm_register.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/tools/irm/irm_register.c b/src/tools/irm/irm_register.c index 23c65f7d..ca15abcf 100644 --- a/src/tools/irm/irm_register.c +++ b/src/tools/irm/irm_register.c @@ -113,21 +113,19 @@ int do_register(int argc, for (i = 0; i < len; ++i) { size_t j; for (j = 0; j < layers_len; j++) { - if (wildcard_match(ipcps[i].layer, layers[j]) == 0) { + if (wildcard_match(layers[j], ipcps[i].layer) == 0) { if (irm_reg(ipcps[i].pid, name)) { free(ipcps); return -1; } - break; } } for (j = 0; j < ipcp_len; j++) { - if (wildcard_match(ipcps[i].name, ipcp[j]) == 0) { + if (wildcard_match(ipcp[j], ipcps[i].name) == 0) { if (irm_reg(ipcps[i].pid, name)) { free(ipcps); return -1; } - break; } } } |