summaryrefslogtreecommitdiffstats
path: root/usr.bin/fstat/fstat.h
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/fstat/fstat.h')
-rw-r--r--usr.bin/fstat/fstat.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/fstat/fstat.h b/usr.bin/fstat/fstat.h
index cf4e15a..dda8bbf 100644
--- a/usr.bin/fstat/fstat.h
+++ b/usr.bin/fstat/fstat.h
@@ -40,14 +40,15 @@
* a kvm_read that returns true if everything is read
*/
#define KVM_READ(kaddr, paddr, len) \
- (kvm_read(kd, (u_long)(kaddr), (char *)(paddr), (len)) == (len))
+ ((len) < SSIZE_MAX && \
+ kvm_read(kd, (u_long)(kaddr), (char *)(paddr), (len)) == (ssize_t)(len))
#define dprintf if (vflg) fprintf
typedef struct devs {
struct devs *next;
long fsid;
- ino_t ino;
+ long ino;
const char *name;
} DEVS;
OpenPOWER on IntegriCloud