Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/fs/msdosfs Avoid unsigned/signed comparision warning to ...
details: https://anonhg.NetBSD.org/src/rev/beff6b49e4b1
branches: trunk
changeset: 343380:beff6b49e4b1
user: martin <martin%NetBSD.org@localhost>
date: Mon Feb 01 10:37:57 2016 +0000
description:
Avoid unsigned/signed comparision warning to fix the build.
diffstat:
sys/fs/msdosfs/msdosfs_conv.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 465922e55f8d -r beff6b49e4b1 sys/fs/msdosfs/msdosfs_conv.c
--- a/sys/fs/msdosfs/msdosfs_conv.c Mon Feb 01 08:53:36 2016 +0000
+++ b/sys/fs/msdosfs/msdosfs_conv.c Mon Feb 01 10:37:57 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: msdosfs_conv.c,v 1.12 2016/02/01 02:59:33 christos Exp $ */
+/* $NetBSD: msdosfs_conv.c,v 1.13 2016/02/01 10:37:57 martin Exp $ */
/*-
* Copyright (C) 1995, 1997 Wolfgang Solfrank.
@@ -62,7 +62,7 @@
#endif
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: msdosfs_conv.c,v 1.12 2016/02/01 02:59:33 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msdosfs_conv.c,v 1.13 2016/02/01 10:37:57 martin Exp $");
/*
* System include files.
@@ -1592,7 +1592,7 @@
*/
len = utf8 ? ucs2utf8str(wn, WIN_CHARS, buf, sizeof(buf)) : ucs2char8str(wn, WIN_CHARS, buf, sizeof(buf));
- if (len > sizeof(dp->d_name) - 1)
+ if (len < 0 || (size_t)len > sizeof(dp->d_name) - 1)
return -1;
/*
Home |
Main Index |
Thread Index |
Old Index