cvs: pecl /expect expect.c
| From: | Michael Spector | Date: | Mon, 20 Feb 2006 15:29:03 +0000 |
| Subject: | cvs: pecl /expect expect.c | ||
| Groups: | php.pecl.cvs | ||
| Request: | Send a blank email to pecl-cvs+get-5212@lists.php.net to get a copy of this message | ||
michael Mon Feb 20 15:29:03 2006 UTC
Modified files:
/pecl/expect expect.c
Log:
conform to C standard of variable declaration
http://cvs.php.net/viewcvs.cgi/pecl/expect/expect.c?r1=1.10&r2=1.11&diff_format=u
Index: pecl/expect/expect.c
diff -u pecl/expect/expect.c:1.10 pecl/expect/expect.c:1.11
--- pecl/expect/expect.c:1.10 Sun Feb 19 14:56:25 2006
+++ pecl/expect/expect.c Mon Feb 20 15:29:03 2006
@@ -253,14 +253,13 @@
}
ec->type = exp_end;
- struct exp_case *ec1 = ecases;
key = exp_expectv (fd, ecases);
int exp_match_len = exp_match_end - exp_match;
if (z_match && exp_match && exp_match_len > 0) {
- zval_dtor (z_match);
char *tmp = (char *)emalloc (sizeof(char) * (exp_match_end - exp_match + 1));
strncpy (tmp, exp_match, exp_match_len);
+ zval_dtor (z_match);
ZVAL_STRING (z_match, tmp, 1);
efree (tmp);
}