aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/posixregex.c
diff options
context:
space:
mode:
authorDavid M. Syzdek <syzdek@bindlebinaries.com>2012-06-04 15:23:08 -0800
committerDavid M. Syzdek <syzdek@bindlebinaries.com>2012-06-04 15:23:08 -0800
commit01464d256fc85e90e8652ec39607323f06fb19ac (patch)
treeec09f261e647b5c7427bb96a52779b0f40b68f94 /src/posixregex.c
parentde596419efd89a8d6bd22d12a18be714dd520d69 (diff)
downloaddmstools-01464d256fc85e90e8652ec39607323f06fb19ac.tar.gz
dmstools-01464d256fc85e90e8652ec39607323f06fb19ac.tar.bz2
dmstools-01464d256fc85e90e8652ec39607323f06fb19ac.tar.xz
dmstools-01464d256fc85e90e8652ec39607323f06fb19ac.zip
Updating how result of regexec() is checked.
Diffstat (limited to 'src/posixregex.c')
-rw-r--r--src/posixregex.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/posixregex.c b/src/posixregex.c
index b0d906a..5d1af5d 100644
--- a/src/posixregex.c
+++ b/src/posixregex.c
@@ -294,7 +294,8 @@ int main(int argc, char * argv[])
294 printf("%3i: %s ==> ", x-optind+1, arg); 294 printf("%3i: %s ==> ", x-optind+1, arg);
295 295
296 // tests the buffer against the regular expression 296 // tests the buffer against the regular expression
297 if ((regexec(&regex, arg, (size_t)MAX_MATCHES, matches, 0))) 297 err = regexec(&regex, arg, (size_t)MAX_MATCHES, matches, 0);
298 if ((err))
298 { 299 {
299 if (!(quiet)) 300 if (!(quiet))
300 printf("not found\n"); 301 printf("not found\n");