summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordscho <dscho>2004-02-29 15:13:38 +0000
committerdscho <dscho>2004-02-29 15:13:38 +0000
commit7aa9d2773359aa8ba72032c952ce0b582f5c674c (patch)
treef7769ace453c57df093e8fe2db2352f0bdfd69a2
parentc08bfcfd0272f1cfde8e42727c24f2706a1b43f4 (diff)
downloadlibtdevnc-7aa9d2773359aa8ba72032c952ce0b582f5c674c.tar.gz
libtdevnc-7aa9d2773359aa8ba72032c952ce0b582f5c674c.zip
fixed valgrind warning
-rw-r--r--ChangeLog3
-rwxr-xr-xrfbregion.c19
2 files changed, 15 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index dd5f864..f3896b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2004-02-29 Johannes E. Schindelin <Johannes.Schindelin@gmx.de>
+ * fixed warning of valgrind for regiontest
+
2004-02-19 Karl Runge <runge@karlrunge.com>
* x11vnc options -nosel -noprimary -visual.
* add clipboard/selection handling.
diff --git a/rfbregion.c b/rfbregion.c
index cfcd510..a102bc2 100755
--- a/rfbregion.c
+++ b/rfbregion.c
@@ -224,8 +224,9 @@ sraSpanListCount(const sraSpanList *list) {
void
sraSpanMergePrevious(sraSpan *dest) {
sraSpan *prev = dest->_prev;
- while ((prev->end == dest->start) &&
- (prev->_prev) &&
+
+ while ((prev->_prev) &&
+ (prev->end == dest->start) &&
(sraSpanListEqual(prev->subspan, dest->subspan))) {
/*
printf("merge_prev:");
@@ -244,8 +245,8 @@ sraSpanMergePrevious(sraSpan *dest) {
void
sraSpanMergeNext(sraSpan *dest) {
sraSpan *next = dest->_next;
- while ((next->start == dest->end) &&
- (next->_next) &&
+ while ((next->_next) &&
+ (next->start == dest->end) &&
(sraSpanListEqual(next->subspan, dest->subspan))) {
/*
printf("merge_next:");
@@ -834,7 +835,7 @@ int main(int argc, char** argv)
rect.x2-rect.x1,rect.y2-rect.y1,
rect.x1,rect.y1);
sraRgnReleaseIterator(i);
- printf("\n20x10+0+0 600x30+0+10 590x10+10+40 30x150+10+50 250x150+350+50 590x100+10+200\n\n");
+ printf("\n20x10+0+0 600x30+0+10 590x10+10+40 30x150+10+50 250x150+350+50 590x100+10+200 \n\n");
i = sraRgnGetReverseIterator(region,1,0);
while(sraRgnIteratorNext(i, &rect))
@@ -842,7 +843,7 @@ int main(int argc, char** argv)
rect.x2-rect.x1,rect.y2-rect.y1,
rect.x1,rect.y1);
sraRgnReleaseIterator(i);
- printf("\n20x10+0+0 600x30+0+10 590x10+10+40 250x150+350+50 30x150+10+50 590x100+10+200\n\n");
+ printf("\n20x10+0+0 600x30+0+10 590x10+10+40 250x150+350+50 30x150+10+50 590x100+10+200 \n\n");
i = sraRgnGetReverseIterator(region,1,1);
while(sraRgnIteratorNext(i, &rect))
@@ -850,7 +851,11 @@ int main(int argc, char** argv)
rect.x2-rect.x1,rect.y2-rect.y1,
rect.x1,rect.y1);
sraRgnReleaseIterator(i);
- printf("\n590x100+10+200 250x150+350+50 30x150+10+50 590x10+10+40 600x30+0+10 20x10+0+0\n\n");
+ printf("\n590x100+10+200 250x150+350+50 30x150+10+50 590x10+10+40 600x30+0+10 20x10+0+0 \n\n");
+
+ sraRgnDestroy(region);
+ sraRgnDestroy(region1);
+ sraRgnDestroy(region2);
return(0);
}