]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* tests-mbwc/tst_funcs.h (TST_IF_RETURN): Only test errno if it
authorAndreas Jaeger <aj@suse.de>
Thu, 17 Aug 2000 15:41:22 +0000 (15:41 +0000)
committerAndreas Jaeger <aj@suse.de>
Thu, 17 Aug 2000 15:41:22 +0000 (15:41 +0000)
should have a value.
2000-08-17  Andreas Jaeger  <aj@suse.de>

* tests-mbwc/tst_funcs.h (TST_IF_RETURN): Only test errno if it
should have a value.

localedata/ChangeLog
localedata/tests-mbwc/tst_funcs.h

index 5d3e847c3b208169d7e5c9bdacdeb764b0c1c5c6..538dd50248ddcbda65146684839beaa0eba23bf6 100644 (file)
@@ -1,3 +1,8 @@
+2000-08-17  Andreas Jaeger  <aj@suse.de>
+
+       * tests-mbwc/tst_funcs.h (TST_IF_RETURN): Only test errno if it
+       should have a value.
+
 2000-08-14  Ulrich Drepper  <drepper@redhat.com>
 
        * locales/iso14651_t1: Rearrange cyrillic and greek sections to
index e72154fa74e109e7fcc3c21da2c78b6d16ac25de..177ca09567bb705592ff0e8bc94503b1da774baf 100644 (file)
@@ -134,7 +134,9 @@ extern int result (FILE * fp, char res, const char *func, const char *loc,
 #define TST_IF_RETURN(_s_func_) \
   if (err_flg == 1)                                                          \
     {                                                                        \
-      if (errno_save == err_exp)                                             \
+      /* If no error occured, errno is undefined. Here we check only if       \
+         errno has the right value if it should have one.  */                \
+      if ((err_exp == 0) || (errno_save == err_exp))                         \
        {                                                                     \
          result (fp, C_SUCCESS, _s_func_, locale, rec+1, seq_num+1, 1,       \
                  MS_PASSED);                                                 \