Introduction
Introduction Statistics Contact Development Disclaimer Help
Rename `off' to `pmatch' - smdev - suckless mdev
git clone git://git.suckless.org/smdev
Log
Files
Refs
README
LICENSE
---
commit 0b6fda11f98333f968a2e159b67a2d8c953a96a6
parent 0c13b2cf9547db0e94825c1343a98eaea5e7b13a
Author: sin <[email protected]>
Date: Mon, 2 Sep 2013 10:55:54 +0100
Rename `off' to `pmatch'
Diffstat:
M smdev.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;
}
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.