lib/tlibio: Fix a build warning
[xfstests-dev.git] / lib / write_log.c
index 851ab65aaf6b174e85f0da58e1ea32bfabde653e..8c921fc54244bc456f378ecf624a62be26cb6c3d 100644 (file)
@@ -1,33 +1,19 @@
 /*
- * Copyright (c) 2000 Silicon Graphics, Inc.  All Rights Reserved.
- * 
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
+ * Copyright (c) 2000 Silicon Graphics, Inc.
+ * All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
  * published by the Free Software Foundation.
- * 
- * This program is distributed in the hope that it would be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- * 
- * Further, this software is distributed without any warranty that it is
- * free of the rightful claim of any third person regarding infringement
- * or the like.  Any license provided herein, whether implied or
- * otherwise, applies only to this software file.  Patent licenses, if
- * any, provided herein do not apply to combinations of this program with
- * other software, or any other product whatsoever.
- * 
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write the Free Software Foundation, Inc., 59
- * Temple Place - Suite 330, Boston MA 02111-1307, USA.
- * 
- * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
- * Mountain View, CA  94043, or:
- * 
- * http://www.sgi.com 
- * 
- * For further information regarding this notice, see: 
- * 
- * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
+ *
+ * This program is distributed in the hope that it would be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write the Free Software Foundation,
+ * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 /*
  * This module contains code for logging writes to files, and for
@@ -68,6 +54,7 @@
 #include <fcntl.h>
 #include <errno.h>
 #include <string.h>
+#include <strings.h>
 #include <sys/param.h>
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -251,7 +238,7 @@ int                         nrecs;
 int                    (*func)();
 long                   data;
 {
-       int                     fd, leftover, nbytes, offset, recnum, reclen, rval;
+       int                     fd, leftover, nbytes, offset, recnum, reclen;
        char                    buf[BSIZE*32], *bufend, *cp, *bufstart;
        char            albuf[WLOG_REC_MAX_SIZE];
        struct wlog_rec wrec;
@@ -353,7 +340,7 @@ long                        data;
                         * stop if instructed to.
                         */
 
-                       if ((rval = (*func)(&wrec, data)) == WLOG_STOP_SCAN) {
+                       if ((*func)(&wrec, data) == WLOG_STOP_SCAN) {
                                break;
                        }