Fix broken error check found by GCC 4.5.

This commit is contained in:
tron 2011-07-18 17:15:07 +00:00
parent b166bb160f
commit 2c0999f3fa

View File

@ -1,4 +1,4 @@
/* $NetBSD: v7fs_populate.c,v 1.1 2011/07/18 08:58:39 uch Exp $ */
/* $NetBSD: v7fs_populate.c,v 1.2 2011/07/18 17:15:07 tron Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(__lint)
__RCSID("$NetBSD: v7fs_populate.c,v 1.1 2011/07/18 08:58:39 uch Exp $");
__RCSID("$NetBSD: v7fs_populate.c,v 1.2 2011/07/18 17:15:07 tron Exp $");
#endif /* !__lint */
#include <stdio.h>
@ -117,7 +117,7 @@ copy_subr(struct v7fs_self *fs, void *ctx, v7fs_daddr_t blk, size_t sz)
{
struct copy_arg *p = ctx;
if ((sz = read(p->fd, p->buf, sz)) != sz) {
if (read(p->fd, p->buf, sz) != (ssize_t)sz) {
return V7FS_ITERATOR_ERROR;
}