diff options
| author | David M. Syzdek <syzdek@bindlebinaries.com> | 2012-06-04 15:23:08 -0800 |
|---|---|---|
| committer | David M. Syzdek <syzdek@bindlebinaries.com> | 2012-06-04 15:23:08 -0800 |
| commit | 01464d256fc85e90e8652ec39607323f06fb19ac (patch) | |
| tree | ec09f261e647b5c7427bb96a52779b0f40b68f94 /src | |
| parent | de596419efd89a8d6bd22d12a18be714dd520d69 (diff) | |
| download | dmstools-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')
| -rw-r--r-- | src/posixregex.c | 3 |
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(®ex, arg, (size_t)MAX_MATCHES, matches, 0))) | 297 | err = regexec(®ex, 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"); |
