summary refs log tree commit diff
path: root/posix/tst-rxspencer.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-11-14 18:17:12 +0000
committerUlrich Drepper <drepper@redhat.com>2003-11-14 18:17:12 +0000
commitecdcadbd16e1a350e9429dff668456e1f943c02b (patch)
tree7e8298b20825cef3c5d5fbaaed80dabb7a938361 /posix/tst-rxspencer.c
parentc85b837e5809aeea1a1237de78a1210bb52d58e6 (diff)
downloadglibc-ecdcadbd16e1a350e9429dff668456e1f943c02b.tar.gz
glibc-ecdcadbd16e1a350e9429dff668456e1f943c02b.tar.xz
glibc-ecdcadbd16e1a350e9429dff668456e1f943c02b.zip
Update.
2003-11-14  Jakub Jelinek  <jakub@redhat.com>

	* posix/tst-rxspencer.c (check_match): @ without any following
	characters must match only end of string.
	(main): Fix filename in error message.
Diffstat (limited to 'posix/tst-rxspencer.c')
-rw-r--r--posix/tst-rxspencer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/posix/tst-rxspencer.c b/posix/tst-rxspencer.c
index a04791c1cc..cddb228f1f 100644
--- a/posix/tst-rxspencer.c
+++ b/posix/tst-rxspencer.c
@@ -184,7 +184,7 @@ check_match (regmatch_t *rm, int idx, const char *string,
 	  return 1;
 	}
 
-      if (strncmp (string + rm[idx].rm_so, match + 1, strlen (match + 1)))
+      if (strncmp (string + rm[idx].rm_so, match + 1, strlen (match + 1) ?: 1))
 	{
 	  printf ("%s rm[%d] not matching %s\n", fail, idx, match);
 	  return 1;
@@ -395,7 +395,7 @@ main (int argc, char **argv)
   f = fopen (argv[optind], "r");
   if (f == NULL)
     {
-      fprintf (stderr, "Couldn't open %s\n", argv[1]);
+      fprintf (stderr, "Couldn't open %s\n", argv[optind]);
       return 1;
     }