From: Michael Wallner Date: Tue, 3 May 2016 14:30:05 +0000 (+0200) Subject: fix coverity issues X-Git-Tag: v2.0.1~2 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=667a04769cea660ab821e851a4585938c18436dd;p=m6w6%2Fext-pq fix coverity issues --- diff --git a/src/php_pq_misc.h b/src/php_pq_misc.h index 2fdb7e1..bffa9d4 100644 --- a/src/php_pq_misc.h +++ b/src/php_pq_misc.h @@ -20,8 +20,8 @@ #define z_is_true zend_is_true #define smart_str_s(ss) (ss)->s -#define smart_str_v(ss) (ss)->s->val -#define smart_str_l(ss) (ss)->s->len +#define smart_str_v(ss) (smart_str_s(ss)?(ss)->s->val:NULL) +#define smart_str_l(ss) (smart_str_s(ss)?(ss)->s->len:0) /* clear result object associated with a result handle */ extern void php_pqres_clear(PGresult *r);