remove if/free block checking known condition

coverity 2762 / run 11
This commit is contained in:
rtr 2006-03-25 13:00:11 +00:00
parent 9fa09ac376
commit 596eb336c9
1 changed files with 2 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: readline.c,v 1.66 2006/03/21 17:52:50 christos Exp $ */
/* $NetBSD: readline.c,v 1.67 2006/03/25 13:00:11 rtr Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@ -38,7 +38,7 @@
#include "config.h"
#if !defined(lint) && !defined(SCCSID)
__RCSID("$NetBSD: readline.c,v 1.66 2006/03/21 17:52:50 christos Exp $");
__RCSID("$NetBSD: readline.c,v 1.67 2006/03/25 13:00:11 rtr Exp $");
#endif /* not lint && not SCCSID */
#include <sys/types.h>
@ -921,10 +921,6 @@ loop:
ret = 1;
break;
}
if (tmp) {
free(tmp);
tmp = NULL;
}
ret = _history_expand_command (str, i, (j - i), &tmp);
if (ret > 0 && tmp) {
len = strlen(tmp);