diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2012-01-10 15:26:55 +0000 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2012-01-13 18:11:59 +0200 |
commit | 68c2897e5bc910151ab5f6c1c06299ae7e60c678 (patch) | |
tree | 310c8fe12f509c67d350a74b0ecfefc363bb6843 /server | |
parent | 51f1ad54ad51cdf202566f26e7d29082a3c577ed (diff) | |
download | spice-68c2897e5bc910151ab5f6c1c06299ae7e60c678.tar.gz spice-68c2897e5bc910151ab5f6c1c06299ae7e60c678.tar.xz spice-68c2897e5bc910151ab5f6c1c06299ae7e60c678.zip |
Remove trailing whitespace from end of lines
Diffstat (limited to 'server')
-rw-r--r-- | server/glz_encode_tmpl.c | 10 | ||||
-rw-r--r-- | server/jpeg_encoder.c | 30 | ||||
-rw-r--r-- | server/jpeg_encoder.h | 2 | ||||
-rw-r--r-- | server/red_client_shared_cache.h | 2 | ||||
-rw-r--r-- | server/red_worker.c | 2 | ||||
-rw-r--r-- | server/tests/README | 2 |
6 files changed, 24 insertions, 24 deletions
diff --git a/server/glz_encode_tmpl.c b/server/glz_encode_tmpl.c index 41edb1b7..1402f953 100644 --- a/server/glz_encode_tmpl.c +++ b/server/glz_encode_tmpl.c @@ -144,10 +144,10 @@ /* returns the length of the match. 0 if no match. if image_distance = 0, pixel_distance is the distance between the matching pixels. Otherwise, it is the offset from the beginning of the referred image */ -static INLINE size_t FNAME(do_match)(SharedDictionary *dict, - WindowImageSegment *ref_seg, const PIXEL *ref, +static INLINE size_t FNAME(do_match)(SharedDictionary *dict, + WindowImageSegment *ref_seg, const PIXEL *ref, const PIXEL *ref_limit, - WindowImageSegment *ip_seg, const PIXEL *ip, + WindowImageSegment *ip_seg, const PIXEL *ip, const PIXEL *ip_limit, #ifdef LZ_PLT int pix_per_byte, @@ -546,9 +546,9 @@ static void FNAME(compress)(Encoder *encoder) FNAME(compress_seg)(encoder, seg_id, ip, 2); // compressing the next segments - for (seg_id = dict->window.segs[seg_id].next; + for (seg_id = dict->window.segs[seg_id].next; seg_id != NULL_IMAGE_SEG_ID && ( - dict->window.segs[seg_id].image->id == encoder->cur_image.id); + dict->window.segs[seg_id].image->id == encoder->cur_image.id); seg_id = dict->window.segs[seg_id].next) { FNAME(compress_seg)(encoder, seg_id, (PIXEL *)dict->window.segs[seg_id].lines, 0); } diff --git a/server/jpeg_encoder.c b/server/jpeg_encoder.c index 1c961774..d0e2fc17 100644 --- a/server/jpeg_encoder.c +++ b/server/jpeg_encoder.c @@ -41,13 +41,13 @@ typedef struct JpegEncoder { /* jpeg destination manager callbacks */ -static void dest_mgr_init_destination(j_compress_ptr cinfo) +static void dest_mgr_init_destination(j_compress_ptr cinfo) { JpegEncoder *enc = (JpegEncoder *)cinfo->client_data; if (enc->dest_mgr.free_in_buffer == 0) { - enc->dest_mgr.free_in_buffer = enc->usr->more_space(enc->usr, + enc->dest_mgr.free_in_buffer = enc->usr->more_space(enc->usr, &enc->dest_mgr.next_output_byte); - + if (enc->dest_mgr.free_in_buffer == 0) { red_error("not enough space"); } @@ -59,12 +59,12 @@ static void dest_mgr_init_destination(j_compress_ptr cinfo) static boolean dest_mgr_empty_output_buffer(j_compress_ptr cinfo) { JpegEncoder *enc = (JpegEncoder *)cinfo->client_data; - enc->dest_mgr.free_in_buffer = enc->usr->more_space(enc->usr, + enc->dest_mgr.free_in_buffer = enc->usr->more_space(enc->usr, &enc->dest_mgr.next_output_byte); - + if (enc->dest_mgr.free_in_buffer == 0) { red_error("not enough space"); - } + } enc->cur_image.out_size += enc->dest_mgr.free_in_buffer; return TRUE; } @@ -85,13 +85,13 @@ JpegEncoderContext* jpeg_encoder_create(JpegEncoderUsrContext *usr) enc = spice_new0(JpegEncoder, 1); enc->usr = usr; - + enc->dest_mgr.init_destination = dest_mgr_init_destination; enc->dest_mgr.empty_output_buffer = dest_mgr_empty_output_buffer; enc->dest_mgr.term_destination = dest_mgr_term_destination; enc->cinfo.err = jpeg_std_error(&enc->jerr); - + jpeg_create_compress(&enc->cinfo); enc->cinfo.client_data = enc; enc->cinfo.dest = &enc->dest_mgr; @@ -99,7 +99,7 @@ JpegEncoderContext* jpeg_encoder_create(JpegEncoderUsrContext *usr) } void jpeg_encoder_destroy(JpegEncoderContext* encoder) -{ +{ jpeg_destroy_compress(&((JpegEncoder*)encoder)->cinfo); free(encoder); } @@ -144,8 +144,8 @@ static void convert_BGRX32_to_RGB24(uint8_t *line, int width, uint8_t **out_line uint32_t *src_line = (uint32_t *)line; uint8_t *out_pix; int x; - - ASSERT(out_line && *out_line); + + ASSERT(out_line && *out_line); out_pix = *out_line; @@ -174,7 +174,7 @@ static void convert_RGB24_to_RGB24(uint8_t *line, int width, uint8_t **out_line) } static void do_jpeg_encode(JpegEncoder *jpeg, uint8_t *lines, unsigned int num_lines) -{ +{ uint8_t *lines_end; uint8_t *RGB24_line; int stride, width; @@ -204,7 +204,7 @@ int jpeg_encode(JpegEncoderContext *jpeg, int quality, JpegEncoderImageType type int width, int height, uint8_t *lines, unsigned int num_lines, int stride, uint8_t *io_ptr, unsigned int num_io_bytes) { - JpegEncoder *enc = (JpegEncoder *)jpeg; + JpegEncoder *enc = (JpegEncoder *)jpeg; enc->cur_image.type = type; enc->cur_image.width = width; @@ -243,6 +243,6 @@ int jpeg_encode(JpegEncoderContext *jpeg, int quality, JpegEncoderImageType type do_jpeg_encode(enc, lines, num_lines); - jpeg_finish_compress(&enc->cinfo); - return enc->cur_image.out_size; + jpeg_finish_compress(&enc->cinfo); + return enc->cur_image.out_size; } diff --git a/server/jpeg_encoder.h b/server/jpeg_encoder.h index 74c73243..690a0296 100644 --- a/server/jpeg_encoder.h +++ b/server/jpeg_encoder.h @@ -35,7 +35,7 @@ typedef enum { JPEG_IMAGE_TYPE_INVALID, JPEG_IMAGE_TYPE_RGB16, - /* in byte per color types, the notation is according to the order of the + /* in byte per color types, the notation is according to the order of the colors in the memory */ JPEG_IMAGE_TYPE_RGB24, JPEG_IMAGE_TYPE_BGR24, diff --git a/server/red_client_shared_cache.h b/server/red_client_shared_cache.h index ed3f1dab..fb405c36 100644 --- a/server/red_client_shared_cache.h +++ b/server/red_client_shared_cache.h @@ -75,7 +75,7 @@ static int FUNC_NAME(set_lossy)(CACHE *cache, uint64_t id, int lossy) break; } item = item->next; - } + } pthread_mutex_unlock(&cache->lock); return !!item; } diff --git a/server/red_worker.c b/server/red_worker.c index c8ac8161..983d7676 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -3098,7 +3098,7 @@ static inline int red_current_add_equal(RedWorker *worker, DrawItem *item, TreeI other_drawable->refs++; current_remove_drawable(worker, other_drawable); - /* sending the drawable to clients that already received + /* sending the drawable to clients that already received * (or will receive) other_drawable */ worker_ring_item = ring_get_head(&worker->display_channel->common.base.clients); dpi_ring_item = ring_get_head(&other_drawable->pipes); diff --git a/server/tests/README b/server/tests/README index 8818830f..e44251de 100644 --- a/server/tests/README +++ b/server/tests/README @@ -14,7 +14,7 @@ test_just_sockets_no_ssl A complete server, only provides the main and inputs channels. Doesn't actually produce anything on the channels. Essentially a test of the regular link code (reds.c), good for multiple connect/disconnect tests. test_empty_success - tests calling + tests calling test_fail_on_null_core_interface should abort when run (when spice tries to watch_add) |