From df257306e3f4e9bd2523994258218d60441219a2 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Wed, 21 Apr 2004 16:00:18 +0000 Subject: [PATCH] Recent changes from 0.9.6-stable. --- crypto/stack/stack.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/crypto/stack/stack.c b/crypto/stack/stack.c index 02857f0446..108ecb6eaf 100644 --- a/crypto/stack/stack.c +++ b/crypto/stack/stack.c @@ -189,8 +189,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) @@ -304,13 +303,13 @@ int sk_num(const STACK *st) char *sk_value(const STACK *st, int i) { - if(st == NULL) return NULL; + if(!st || (i < 0) || (i >= st->num)) return NULL; return st->data[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