diff options
Diffstat (limited to 'winsup/utils/path.cc')
-rw-r--r-- | winsup/utils/path.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/winsup/utils/path.cc b/winsup/utils/path.cc index 8c17dce14..a66dcdc14 100644 --- a/winsup/utils/path.cc +++ b/winsup/utils/path.cc @@ -1,7 +1,7 @@ /* path.cc - Copyright 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 - Red Hat, Inc. + Copyright 2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, + 2013 Red Hat, Inc. This file is part of Cygwin. @@ -25,6 +25,7 @@ details. */ #include "path.h" #include "../cygwin/include/cygwin/version.h" #include "../cygwin/include/sys/mount.h" +#define _NOMNTENT_MACROS #include "../cygwin/include/mntent.h" #include "testsuite.h" #ifdef FSTAB_ONLY @@ -841,7 +842,7 @@ vcygpath (const char *cwd, const char *s, va_list v) if (n < max_len || !path_prefix_p (m->posix, path, n)) continue; if ((m->flags & MOUNT_CYGDRIVE) - && (strlen (path) < n + 2 + && ((int) strlen (path) < n + 2 || path[n] != '/' || !isalpha (path[n + 1]) || path[n + 2] != '/')) @@ -917,7 +918,8 @@ getmntent (FILE *) if (!mnt.mnt_opts) mnt.mnt_opts = (char *) malloc (64); - strcpy (mnt.mnt_type, (char *) (m->flags & MOUNT_SYSTEM) ? "system" : "user"); + strcpy (mnt.mnt_type, + (char *) ((m->flags & MOUNT_SYSTEM) ? "system" : "user")); if (!(m->flags & MOUNT_BINARY)) strcpy (mnt.mnt_opts, (char *) "text"); |