From 15c6cbd464a35eb994e4c14346cd07265b9cb3d4 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Wed, 21 Apr 2004 16:03:00 +0000 Subject: [PATCH] Recent changes from 0.9.7-stable. --- crypto/stack/stack.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crypto/stack/stack.c b/crypto/stack/stack.c index ff6d14a86c..a6ecbe4c68 100644 --- a/crypto/stack/stack.c +++ b/crypto/stack/stack.c @@ -191,8 +191,7 @@ char *sk_delete(STACK *st, int loc) char *ret; int i,j; - if ((st == NULL) || (st->num == 0) || (loc < 0) - || (loc >= st->num)) return(NULL); + if(!st || (loc < 0) || (loc >= st->num)) return NULL; ret=st->data[loc]; if (loc != st->num-1) @@ -312,7 +311,7 @@ char *sk_value(const STACK *st, int i) char *sk_set(STACK *st, int i, char *value) { - if(st == NULL) return NULL; + if(!st || (i < 0) || (i >= st->num)) return NULL; return (st->data[i] = value); } -- 2.25.1