Coverity CID 798: t can only be null if p is null. otherwise p needs to contain
a name.
This commit is contained in:
parent
20a63f0a54
commit
e5f6d71c5b
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: stree.c,v 1.7 2004/12/21 16:20:09 christos Exp $ */
|
||||
/* $NetBSD: stree.c,v 1.8 2006/03/22 17:14:16 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992 Carnegie Mellon University
|
||||
@ -55,6 +55,7 @@
|
||||
#include "libc.h"
|
||||
#include "c.h"
|
||||
#include <sys/param.h>
|
||||
#include <assert.h>
|
||||
#include "supcdefs.h"
|
||||
#include "supextern.h"
|
||||
|
||||
@ -228,7 +229,8 @@ Tinsert(TREE ** t, char *p, int find)
|
||||
{
|
||||
int deltah;
|
||||
|
||||
if (p != NULL && p[0] == '.' && p[1] == '/') {
|
||||
assert((t == NULL && p == NULL) || (t != NULL && p != NULL));
|
||||
if (p[0] == '.' && p[1] == '/') {
|
||||
p += 2;
|
||||
while (*p == '/')
|
||||
p++;
|
||||
|
Loading…
Reference in New Issue
Block a user