diff options
author | SVN Migration <svn@php.net> | 2008-12-03 20:30:45 +0000 |
---|---|---|
committer | SVN Migration <svn@php.net> | 2008-12-03 20:30:45 +0000 |
commit | 2876046398950e59c3b3c460e67e6fec7ff2ba3c (patch) | |
tree | 33b2b8b4b859960a6446ad19d0ada1c55f9cfcda /ext/standard/versioning.c | |
parent | 3fb86b0b9e79e6a3312b694f30ee627e2e1b325c (diff) | |
download | php-git-php-5.3.0alpha2.tar.gz |
This commit was manufactured by cvs2svn to create tag 'php_5_3_0alpha2'.php-5.3.0alpha2
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(); |