[mythtv] [PATCH] : small cleanup

Matt Zimmerman mdz at debian.org
Mon Nov 10 12:01:42 EST 2003


On Mon, Nov 10, 2003 at 12:12:53AM +0100, manu wrote:

> this is my first patch for myth, tell me if I got it wrong.
> [...]
> --- ../../../mythtv-cvs/mythtv/libs/libmyth/audiooutputoss.cpp	2003-10-23 22:28:34.000000000 +0200
> +++ libs/libmyth/audiooutputoss.cpp	2003-11-09 22:46:29.000000000 +0100
> @@ -227,16 +227,16 @@
>      while ((written < size) && 
>             ((lw = write(audiofd, tmpbuf, size - written)) > 0))
>      {
> -        if (lw == -1)
> -        {
> -            cerr << "Error writing to audio device, exiting\n";
> -            close(audiofd);
> -            audiofd = -1;
> -            return;
> -        }
>          written += lw;
>          tmpbuf += lw;
>      }
> +    if (lw < 0)
> +      {
> +	cerr << "Error writing to audio device, exiting\n";
> +	close(audiofd);
> +	audiofd = -1;
> +	return;
> +      }
>  }
>  
>  void AudioOutputOSS::SetTimecode(long long timecode)

Please avoid reindenting code when submitting patches.


-- 
 - mdz


More information about the mythtv-dev mailing list