diff options
author | Rasmus Lerdorf <rasmus@php.net> | 2000-11-06 01:07:53 +0000 |
---|---|---|
committer | Rasmus Lerdorf <rasmus@php.net> | 2000-11-06 01:07:53 +0000 |
commit | 16ca32d0579afa40c7cd1376195623db03306fee (patch) | |
tree | b2c00a06c91edb1e3ef880a4c0da4fcd0585d77f /ext/sybase/php_sybase_db.c | |
parent | ee7821ea7d21618a9aa68166b091edaa3228c55e (diff) | |
download | php-git-16ca32d0579afa40c7cd1376195623db03306fee.tar.gz |
Make sure these are initialized to NULL
Diffstat (limited to 'ext/sybase/php_sybase_db.c')
-rw-r--r-- | ext/sybase/php_sybase_db.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/ext/sybase/php_sybase_db.c b/ext/sybase/php_sybase_db.c index 3b10010b12..e8a88ff88d 100644 --- a/ext/sybase/php_sybase_db.c +++ b/ext/sybase/php_sybase_db.c @@ -257,14 +257,13 @@ PHP_RSHUTDOWN_FUNCTION(sybase) static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent) { - char *user,*passwd,*host,*charset; + char *user=NULL,*passwd=NULL,*host=NULL,*charset=NULL; char *hashed_details; int hashed_details_length; sybase_link sybase,*sybase_ptr; switch(ZEND_NUM_ARGS()) { case 0: /* defaults */ - host=user=passwd=NULL; hashed_details_length=6+3; hashed_details = (char *) emalloc(hashed_details_length+1); strcpy(hashed_details,"sybase___"); @@ -277,7 +276,6 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent) } convert_to_string(yyhost); host = yyhost->value.str.val; - user=passwd=charset=NULL; hashed_details_length = yyhost->value.str.len+6+3; hashed_details = (char *) emalloc(hashed_details_length+1); sprintf(hashed_details,"sybase_%s__",yyhost->value.str.val); @@ -293,7 +291,6 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent) convert_to_string(yyuser); host = yyhost->value.str.val; user = yyuser->value.str.val; - passwd=charset=NULL; hashed_details_length = yyhost->value.str.len+yyuser->value.str.len+6+3; hashed_details = (char *) emalloc(hashed_details_length+1); sprintf(hashed_details,"sybase_%s_%s_",yyhost->value.str.val,yyuser->value.str.val); @@ -311,7 +308,6 @@ static void php_sybase_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent) host = yyhost->value.str.val; user = yyuser->value.str.val; passwd = yypasswd->value.str.val; - charset = NULL; hashed_details_length = yyhost->value.str.len+yyuser->value.str.len+yypasswd->value.str.len+6+3; hashed_details = (char *) emalloc(hashed_details_length+1); sprintf(hashed_details,"sybase_%s_%s_%s",yyhost->value.str.val,yyuser->value.str.val,yypasswd->value.str.val); /* SAFE */ |