]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Correct logic in test for file size.
authorUlrich Drepper <drepper@redhat.com>
Wed, 19 Nov 1997 22:54:13 +0000 (22:54 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 19 Nov 1997 22:54:13 +0000 (22:54 +0000)
intl/loadmsgcat.c

index bcfaacb8bf41109065fb84a6f59ed9243fc6b492..00450cfa06813b6bad8df30ce26c9848b121dcb1 100644 (file)
@@ -1,5 +1,5 @@
 /* loadmsgcat.c -- load needed message catalogs
-   Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
 
 This file is part of the GNU C Library.  Its master source is NOT part of
 the C library, however.  The master source lives in /gd/gnu/lib.
@@ -94,7 +94,7 @@ _nl_load_domain (domain_file)
 
   /* We must know about the size of the file.  */
   if (fstat (fd, &st) != 0
-      && st.st_size < (off_t) sizeof (struct mo_file_header))
+      || st.st_size < (off_t) sizeof (struct mo_file_header))
     {
       /* Something went wrong.  */
       close (fd);