svn: /php/php-src/ branches/PHP_5_2/ext/standard/pack.c branches/PHP_5_3/ext/standard/pack.c trunk/ext/standard/pack.c
| From: | Ilia Alshanetsky | Date: | Mon, 24 Aug 2009 18:40:13 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_2/ext/standard/pack.c branches/PHP_5_3/ext/standard/pack.c trunk/ext/standard/pack.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-60205@lists.php.net to get a copy of this message | ||
iliaa Mon, 24 Aug 2009 18:40:13 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=287647
Log:
Don't clober variables
Changed paths:
U php/php-src/branches/PHP_5_2/ext/standard/pack.c
U php/php-src/branches/PHP_5_3/ext/standard/pack.c
U php/php-src/trunk/ext/standard/pack.c
Modified: php/php-src/branches/PHP_5_2/ext/standard/pack.c
===================================================================
--- php/php-src/branches/PHP_5_2/ext/standard/pack.c 2009-08-24 18:30:20 UTC (rev 287646)
+++ php/php-src/branches/PHP_5_2/ext/standard/pack.c 2009-08-24 18:40:13 UTC (rev 287647)
@@ -708,15 +708,15 @@
buf = emalloc(len + 1);
for (ipos = opos = 0; opos < len; opos++) {
- char c = (input[inputpos + ipos] >> nibbleshift) & 0xf;
+ char cc = (input[inputpos + ipos] >> nibbleshift) & 0xf;
- if (c < 10) {
- c += '0';
+ if (cc < 10) {
+ cc += '0';
} else {
- c += 'a' - 10;
+ cc += 'a' - 10;
}
- buf[opos] = c;
+ buf[opos] = cc;
nibbleshift = (nibbleshift + 4) & 7;
if (first-- == 0) {
Modified: php/php-src/branches/PHP_5_3/ext/standard/pack.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/pack.c 2009-08-24 18:30:20 UTC (rev 287646)
+++ php/php-src/branches/PHP_5_3/ext/standard/pack.c 2009-08-24 18:40:13 UTC (rev 287647)
@@ -693,15 +693,15 @@
buf = emalloc(len + 1);
for (ipos = opos = 0; opos < len; opos++) {
- char c = (input[inputpos + ipos] >> nibbleshift) & 0xf;
+ char cc = (input[inputpos + ipos] >> nibbleshift) & 0xf;
- if (c < 10) {
- c += '0';
+ if (cc < 10) {
+ cc += '0';
} else {
- c += 'a' - 10;
+ cc += 'a' - 10;
}
- buf[opos] = c;
+ buf[opos] = cc;
nibbleshift = (nibbleshift + 4) & 7;
if (first-- == 0) {
Modified: php/php-src/trunk/ext/standard/pack.c
===================================================================
--- php/php-src/trunk/ext/standard/pack.c 2009-08-24 18:30:20 UTC (rev 287646)
+++ php/php-src/trunk/ext/standard/pack.c 2009-08-24 18:40:13 UTC (rev 287647)
@@ -686,15 +686,15 @@
buf = emalloc(len + 1);
for (ipos = opos = 0; opos < len; opos++) {
- char c = (input[inputpos + ipos] >> nibbleshift) & 0xf;
+ char cc = (input[inputpos + ipos] >> nibbleshift) & 0xf;
- if (c < 10) {
- c += '0';
+ if (cc < 10) {
+ cc += '0';
} else {
- c += 'a' - 10;
+ cc += 'a' - 10;
}
- buf[opos] = c;
+ buf[opos] = cc;
nibbleshift = (nibbleshift + 4) & 7;
if (first-- == 0) {