diff options
author | George Hazan <george.hazan@gmail.com> | 2015-08-29 17:51:10 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-08-29 17:51:10 +0000 |
commit | 995d9bcf3ef85618ac6bc44e3b0543f9e357e661 (patch) | |
tree | e9f3816ab36c2e5cbdfebff73858d8a33a4fa02c /protocols/Yahoo/src/libyahoo2 | |
parent | 6ebe0cdcc6bef0b8628a75d3bec6f70d2987bc94 (diff) |
oops... some more 'hides' warnings
git-svn-id: http://svn.miranda-ng.org/main/trunk@15100 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Yahoo/src/libyahoo2')
-rw-r--r-- | protocols/Yahoo/src/libyahoo2/yahoo_util.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/protocols/Yahoo/src/libyahoo2/yahoo_util.cpp b/protocols/Yahoo/src/libyahoo2/yahoo_util.cpp index 63149f3821..8192436834 100644 --- a/protocols/Yahoo/src/libyahoo2/yahoo_util.cpp +++ b/protocols/Yahoo/src/libyahoo2/yahoo_util.cpp @@ -119,14 +119,12 @@ void y_strfreev(char ** vector) char ** y_strsplit(char * str, char * sep, int nelem)
{
char ** vector;
- char *s, *p;
int i=0;
int l = (int)strlen(sep);
if (nelem <= 0) {
- char * s;
nelem=0;
if (*str) {
- for(s=strstr(str, sep); s; s=strstr(s+l, sep),nelem++)
+ for(char *s=strstr(str, sep); s; s=strstr(s+l, sep),nelem++)
;
if (strcmp(str+strlen(str)-l, sep))
nelem++;
@@ -135,7 +133,7 @@ char ** y_strsplit(char * str, char * sep, int nelem) vector = y_new(char *, nelem + 1);
- for(p=str, s=strstr(p,sep); i<nelem && s; p=s+l, s=strstr(p,sep), i++) {
+ for(char *p=str, *s=strstr(p,sep); i<nelem && s; p=s+l, s=strstr(p,sep), i++) {
int len = s-p;
vector[i] = y_new(char, len+1);
strncpy(vector[i], p, len);
|