[Spice-devel] [PATCH 05/10] syntax-check: Don't use tabs for indentation
Victor Toso
lists at victortoso.com
Wed Oct 7 22:48:03 PDT 2015
Hi,
On Wed, Oct 07, 2015 at 06:45:12PM +0200, Christophe Fergeau wrote:
> ---
> server/red_worker.c | 2 +-
> server/reds_stream.c | 10 +++++-----
> 2 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/server/red_worker.c b/server/red_worker.c
> index babb597..011c688 100644
> --- a/server/red_worker.c
> +++ b/server/red_worker.c
> @@ -12117,7 +12117,7 @@ static void red_init(RedWorker *worker, WorkerInitData *init_data)
> if (worker->record_fd == NULL) {
> spice_error("failed to open recording file %s\n", record_filename);
> }
> - if (fwrite(header, sizeof(header)-1, 1, worker->record_fd) != 1) {
> + if (fwrite(header, sizeof(header)-1, 1, worker->record_fd) != 1) {
> spice_error("failed to write replay header");
> }
> }
> diff --git a/server/reds_stream.c b/server/reds_stream.c
> index 1a595b2..5f9890e 100644
> --- a/server/reds_stream.c
> +++ b/server/reds_stream.c
> @@ -448,16 +448,16 @@ static void async_read_handler(G_GNUC_UNUSED int fd,
> break;
> default:
> async_read_clear_handlers(async);
> - if (async->error) {
> + if (async->error) {
> async->error(async->opaque, errno);
> - }
> + }
> return;
> }
> } else {
> async_read_clear_handlers(async);
> - if (async->error) {
> - async->error(async->opaque, 0);
> - }
> + if (async->error) {
> + async->error(async->opaque, 0);
> + }
> return;
> }
> } else {
Would make sense to remove other tabs as well?
<snip>
grep -nrIP '\t' server/ --exclude=Makefile*
server/mjpeg_encoder.c:277: unsigned char ** outbuffer; /* target buffer */
server/mjpeg_encoder.c:279: uint8_t * buffer; /* start of buffer */
server/mjpeg_encoder.c:337:#define OUTPUT_BUF_SIZE 4096 /* choose an efficiently fwrite'able size */
server/mjpeg_encoder.c:339: if (outbuffer == NULL || outsize == NULL) /* sanity check */
server/mjpeg_encoder.c:345: if (cinfo->dest == NULL) { /* first time for this JPEG object? */
server/glz_encoder.h:45: NOTE : currently supports only rgb images in which width*bytes_per_pixel = stride OR
</snip>
We could also have some git-hook to avoid new tab insertions in the
future.
cheers,
Victor Toso
More information about the Spice-devel
mailing list