diff options
Diffstat (limited to 'ext/standard/versioning.c')
-rw-r--r-- | ext/standard/versioning.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/ext/standard/versioning.c b/ext/standard/versioning.c index 08b65d697c..4160fc6359 100644 --- a/ext/standard/versioning.c +++ b/ext/standard/versioning.c @@ -45,7 +45,7 @@ php_canonicalize_version(const char *version) p = version; q = buf; *q++ = lp = *p++; - + lq = '\0'; while (*p) { /* s/[-_+]/./g; * s/([^\d\.])([^\D\.])/$1.$2/g; @@ -55,22 +55,22 @@ php_canonicalize_version(const char *version) #define isndig(x) (!isdigit(x)&&(x)!='.') #define isspecialver(x) ((x)=='-'||(x)=='_'||(x)=='+') - lq = *(q - 1); + lq = *(q - 1); if (isspecialver(*p)) { if (lq != '.') { - *q++ = '.'; + lq = *q++ = '.'; } } else if ((isndig(lp) && isdig(*p)) || (isdig(lp) && isndig(*p))) { if (lq != '.') { *q++ = '.'; } - *q++ = *p; + lq = *q++ = *p; } else if (!isalnum(*p)) { if (lq != '.') { - *q++ = '.'; + lq = *q++ = '.'; } } else { - *q++ = *p; + lq = *q++ = *p; } lp = *p++; } @@ -210,8 +210,8 @@ php_version_compare(const char *orig_ver1, const char *orig_ver2) PHP_FUNCTION(version_compare) { - char *v1, *v2, *op = NULL; - int v1_len, v2_len, op_len = 0; + char *v1, *v2, *op; + int v1_len, v2_len, op_len; int compare, argc; argc = ZEND_NUM_ARGS(); |