smdev

suckless mdev
git clone git://git.suckless.org/smdev
Log | Files | Refs | README | LICENSE

commit 0b6fda11f98333f968a2e159b67a2d8c953a96a6
parent 0c13b2cf9547db0e94825c1343a98eaea5e7b13a
Author: sin <sin@2f30.org>
Date:   Mon,  2 Sep 2013 10:55:54 +0100

Rename `off' to `pmatch'

Diffstat:
Msmdev.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/smdev.c b/smdev.c @@ -137,7 +137,7 @@ matchrule(int ruleidx, char *devname) { struct rule *rule = &rules[ruleidx]; regex_t *preg; - regmatch_t off; + regmatch_t pmatch; int ret; if (!pregcache[ruleidx].cached) { @@ -149,9 +149,9 @@ matchrule(int ruleidx, char *devname) } preg = &pregcache[ruleidx].preg; - ret = regexec(preg, devname, 1, &off, 0); - if (ret == REG_NOMATCH || off.rm_so || - off.rm_eo != strlen(devname)) + ret = regexec(preg, devname, 1, &pmatch, 0); + if (ret == REG_NOMATCH || pmatch.rm_so || + pmatch.rm_eo != strlen(devname)) return -1; return 0; }