- 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 87af7586e114887ad29c89b7ba968c03e313cf66..dbbf999040157b17fef8152baedd7f38ea77c0b1 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 9cd8fbe451e542faa37eee977145e20daf4190ef..bd297df499cfcc3e4bd3c39e56e915073429e1aa 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 c78c09fba31503f37ee15a439565c93202f381fe..17f6c7796a18f003336212521affb5a1dd2ba86d 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;
                        }