On Tue, Mar 18, 2003 at 03:15:10PM -0000, Wez Furlong wrote:

> wez           Tue Mar 18 10:15:10 2003 EDT
> 
>   Modified files:              
>     /php4/ext/openssl xp_ssl.c 
>     /php4/main/streams        xp_socket.c 
>   Log:
>   avoid unsigned issues.

[...]
   
> -     if (didwrite > 0)
> +     if (didwrite > 0) {
>               php_stream_notify_progress_increment(stream->context, didwrite, 0);
> +     }
>  
> +     if (didwrite < 0) {
> +             didwrite = 0;
> +     }

[...]

> +     if (nr_bytes > 0) {
>               php_stream_notify_progress_increment(stream->context, nr_bytes, 0);
> +     }
> +
> +     if (nr_bytes < 0) {
> +             nr_bytes = 0;
> +     }

[...]
  
> +     if (nr_bytes > 0) {
>               php_stream_notify_progress_increment(stream->context, nr_bytes, 0);
> +     }
> +
> +     if (nr_bytes < 0) {
> +             nr_bytes = 0;
> +     }

Would it be preferable to use 'else if's in these cases, instead?

    if (nr_bytes > 0) {
        php_stream_notify_progress_increment(stream->context, nr_bytes, 0);
    } else if (nr_bytes < 0) {
        nr_bytes = 0;
    }

-- 
Jon Parise ([EMAIL PROTECTED]) :: The PHP Project (http://www.php.net/)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to