nfs4: Expect file system root path to be NULL

This commit is contained in:
Pawel Dziepak
2013-01-02 16:26:57 +01:00
parent fee08ed6ad
commit 68e64c7ab0
@@ -60,17 +60,19 @@ FileSystem::~FileSystem()
static const char*
GetPath(const char* root, const char* path)
{
ASSERT(root != NULL);
ASSERT(path != NULL);
int slash = 0;
int i;
for (i = 0; path[i] != '\0'; i++) {
if (path[i] != root[i] || root[i] == '\0')
break;
if (path[i] == '/')
slash = i;
if (root == NULL)
break;
if (path[i] != root[i] || root[i] == '\0')
break;
}
if (path[i] == '\0')