ZEND_API void zend_do_bind_traits(zend_class_entry *ce) /* {{{ */
{
- if (ce->num_traits <= 0) {
+ if (ce->num_traits == 0) {
return;
}
s = (const Bucket *) b;
if (!f->key && !s->key) { /* both numeric */
- return ZEND_NORMALIZE_BOOL(f->h - s->h);
+ if (f->h > s->h) {
+ return -1;
+ } else if (f->h < s->h) {
+ return 1;
+ }
+ return 0;
} else if (!f->key) { /* f is numeric, s is not */
return -1;
} else if (!s->key) { /* s is numeric, f is not */
zend_llist_element **elements;
zend_llist_element *element, **ptr;
- if (l->count <= 0) {
+ if (l->count == 0) {
return;
}
static inline time_t FileTimeToUnixTime(const FILETIME *FileTime)
{
__int64 UnixTime;
- long *nsec = NULL;
SYSTEMTIME SystemTime;
FileTimeToSystemTime(FileTime, &SystemTime);
UnixTime -= (SECS_BETWEEN_EPOCHS * SECS_TO_100NS);
- if (nsec) {
- *nsec = (UnixTime % SECS_TO_100NS) * (__int64)100;
- }
-
UnixTime /= SECS_TO_100NS; /* now convert to seconds */
if ((time_t)UnixTime != UnixTime) {
zval_dtor(return_value);
RETURN_FALSE;
}
- if (!key || (ZSTR_LEN(key) <= 0)) {
+ if (!key || (ZSTR_LEN(key) == 0)) {
/* Note: a zero length key is no key at all */
php_error_docref(NULL, E_WARNING, "HMAC requested without a key");
zval_dtor(return_value);
laststart = lastspace = 0;
for (current = 0; current < (zend_long)ZSTR_LEN(text); current++) {
- if (chk <= 0) {
+ if (chk == 0) {
alloced += (size_t) (((ZSTR_LEN(text) - current + 1)/linelength + 1) * breakchar_len) + 1;
newtext = zend_string_extend(newtext, alloced, 0);
chk = (size_t) ((ZSTR_LEN(text) - current)/linelength) + 1;
while ((!max_chars || (max_chars > 0 && char_count < max_chars)) && begin > 0) {
char_count++;
begin--;
- if (begin <= 0 || _isnewline(heb_str[begin])) {
+ if (_isnewline(heb_str[begin])) {
while (begin > 0 && _isnewline(heb_str[begin-1])) {
begin--;
char_count++;
}
begin=orig_begin;
- if (begin <= 0) {
+ if (begin == 0) {
*target = 0;
break;
}
int state=0, done=0;
char *norm;
- if (len <= 0) {
+ if (len == 0) {
return 0;
}
e = src + src_len;
while (s < e) {
- if ((len = PHP_UU_DEC(*s++)) <= 0) {
+ if ((len = PHP_UU_DEC(*s++)) == 0) {
break;
}
/* sanity check */
}
count = zend_array_count(myht);
php_printf("%sarray(%d) {\n", COMMON, count);
- is_temp = 0;
ZEND_HASH_FOREACH_KEY_VAL_IND(myht, num, key, val) {
php_array_element_dump(val, num, key, level);
if (level > 1 && !(GC_FLAGS(myht) & GC_IMMUTABLE)) {
GC_UNPROTECT_RECURSION(myht);
}
- if (is_temp) {
- zend_hash_destroy(myht);
- efree(myht);
- }
if (level > 1) {
php_printf("%*c", level-1, ' ');
}