Sync current upstream fnmatch.c.
Bug: http://b/22855370 Change-Id: I589f849aaede3b69b6b3682989bab7d8649dcd97
This commit is contained in:
parent
807f27f954
commit
c46c0e960d
@ -1,4 +1,4 @@
|
|||||||
/* $OpenBSD: fnmatch.c,v 1.17 2013/11/24 23:51:29 deraadt Exp $ */
|
/* $OpenBSD: fnmatch.c,v 1.18 2014/12/11 16:25:34 millert Exp $ */
|
||||||
|
|
||||||
/* Copyright (c) 2011, VMware, Inc.
|
/* Copyright (c) 2011, VMware, Inc.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
@ -88,7 +88,6 @@
|
|||||||
#include <fnmatch.h>
|
#include <fnmatch.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <limits.h>
|
|
||||||
|
|
||||||
#include "charclass.h"
|
#include "charclass.h"
|
||||||
|
|
||||||
@ -294,10 +293,6 @@ int fnmatch(const char *pattern, const char *string, int flags)
|
|||||||
const char *mismatch = NULL;
|
const char *mismatch = NULL;
|
||||||
int matchlen = 0;
|
int matchlen = 0;
|
||||||
|
|
||||||
if (strnlen(pattern, PATH_MAX) == PATH_MAX ||
|
|
||||||
strnlen(string, PATH_MAX) == PATH_MAX)
|
|
||||||
return (FNM_NOMATCH);
|
|
||||||
|
|
||||||
if (*pattern == '*')
|
if (*pattern == '*')
|
||||||
goto firstsegment;
|
goto firstsegment;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user