From b096694504dfd19991cd4f475630143cd4cd99d8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C3=ABl=20Carr=C3=A9?= Date: Wed, 1 Nov 2006 08:17:42 +0000 Subject: [PATCH] Removes useless sanity checks --- modules/access/file.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/access/file.c b/modules/access/file.c index cd8d2e943a..856e8180da 100644 --- a/modules/access/file.c +++ b/modules/access/file.c @@ -508,7 +508,7 @@ static int Control( access_t *p_access, int i_query, va_list args ) static char *expand_path (const access_t *p_access, const char *path) { - if ( ( strlen (path) >= 2 ) && ( strncmp (path, "~/", 2) == 0 )) + if (strncmp (path, "~/", 2) == 0) { char *res; @@ -519,8 +519,7 @@ static char *expand_path (const access_t *p_access, const char *path) } #if defined(WIN32) - if ( ( strlen(p_access->psz_access ) >= 4 ) - && !strcasecmp (p_access->psz_access, "file") + if (!strcasecmp (p_access->psz_access, "file") && ('/' == path[0]) && path[1] && (':' == path[2]) && ('/' == path[3])) // Explorer can open path such as file:/C:/ or file:///C:/ // hence remove leading / if found -- 2.39.2