- atof -> zend_strtod
authorMichael Wallner <mike@php.net>
Sat, 19 May 2007 19:32:04 +0000 (19:32 +0000)
committerMichael Wallner <mike@php.net>
Sat, 19 May 2007 19:32:04 +0000 (19:32 +0000)
http_headers_api.c
http_info_api.c
http_message_api.c

index 87af758..dbbf999 100644 (file)
@@ -156,7 +156,7 @@ PHP_HTTP_API HashTable *_http_negotiate_q(const char *header, HashTable *support
                                        
                                        while (*++ptr && !HTTP_IS_CTYPE(digit, *ptr) && '.' != *ptr);
                                        
-                                       quality = atof(ptr);
+                                       quality = zend_strtod(ptr, NULL);
                                        identifier = estrndup(Z_STRVAL_PP(entry), ident_len = separator - Z_STRVAL_PP(entry));
                                } else {
                                        quality = 1000.0 - i++;
index 9cd8fbe..bd297df 100644 (file)
@@ -89,7 +89,7 @@ PHP_HTTP_API STATUS _http_info_parse_ex(const char *pre_header, http_info *info,
        }
 #endif
 
-       info->http.version = atof(http + lenof("HTTP/"));
+       info->http.version = zend_strtod(http + lenof("HTTP/"), NULL);
        
        /* is response */
        if (pre_header == http) {
index c78c09f..17f6c77 100644 (file)
@@ -92,7 +92,7 @@ PHP_HTTP_API http_message *_http_message_init_env(http_message *message, http_me
        switch (inf.type = type) {
                case HTTP_MSG_REQUEST:
                        if ((sval = http_get_server_var("SERVER_PROTOCOL", 1)) && !strncmp(Z_STRVAL_P(sval), "HTTP/", lenof("HTTP/"))) {
-                               inf.http.version = atof(Z_STRVAL_P(sval) + lenof("HTTP/"));
+                               inf.http.version = zend_strtod(Z_STRVAL_P(sval) + lenof("HTTP/"), NULL);
                        } else {
                                inf.http.version = 1.1;
                        }