]> granicus.if.org Git - php/commitdiff
WS fix
authorfoobar <sniper@php.net>
Mon, 1 Dec 2003 16:37:11 +0000 (16:37 +0000)
committerfoobar <sniper@php.net>
Mon, 1 Dec 2003 16:37:11 +0000 (16:37 +0000)
ext/dio/dio.c

index 62adc5ae320e26605fb028063b39531a35f45fba..c4b97e204b000ed3a1a2774420f8b617bd5ba613 100644 (file)
@@ -424,13 +424,13 @@ PHP_FUNCTION(dio_tcsetattr)
        long BAUD,DATABITS,STOPBITS,PARITYON,PARITY;
        HashTable      *fh;
        zval          **element;
-        
+
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rz", &r_fd, &arg) == FAILURE) {
                return;
        }
        
        ZEND_FETCH_RESOURCE(f, php_fd_t *, &r_fd, -1, le_fd_name, le_fd);
+
        if (Z_TYPE_P(arg) != IS_ARRAY) {
                php_error_docref(NULL TSRMLS_CC, E_WARNING,"tcsetattr, third argument should be an associative array");
                return;
@@ -462,8 +462,8 @@ PHP_FUNCTION(dio_tcsetattr)
                Parity = Z_LVAL_PP(element);
        } 
 
-    /* assign to correct values... */
-    switch (Baud_Rate)  {
+       /* assign to correct values... */
+       switch (Baud_Rate)  {
                case 38400:            
                        BAUD = B38400;
                        break;
@@ -559,7 +559,7 @@ PHP_FUNCTION(dio_tcsetattr)
                        php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid parity %d", Parity);
                        RETURN_FALSE;
        }   
-        
+
        newtio.c_cflag = BAUD | CRTSCTS | DATABITS | STOPBITS | PARITYON | PARITY | CLOCAL | CREAD;
        newtio.c_iflag = IGNPAR;
        newtio.c_oflag = 0;