diff --git a/src/motif/dcclient.cpp b/src/motif/dcclient.cpp index edc154f80a..16e026dc20 100644 --- a/src/motif/dcclient.cpp +++ b/src/motif/dcclient.cpp @@ -2211,26 +2211,26 @@ static void XCopyRemote(Display *src_display, Display *dest_display, pixel = cachedest[k]; goto install; } - if (all_cache) - for (k = CACHE_SIZE; k-- > cache_pos; ) - if (cachesrc[k] == pixel) { - pixel = cachedest[k]; - goto install; - } + if (all_cache) + for (k = CACHE_SIZE; k-- > cache_pos; ) + if (cachesrc[k] == pixel) { + pixel = cachedest[k]; + goto install; + } - cachesrc[cache_pos] = xcol.pixel = pixel; - XQueryColor(src_display, srccm, &xcol); - if (!XAllocColor(dest_display, destcm, &xcol)) - xcol.pixel = 0; - cachedest[cache_pos] = pixel = xcol.pixel; + cachesrc[cache_pos] = xcol.pixel = pixel; + XQueryColor(src_display, srccm, &xcol); + if (!XAllocColor(dest_display, destcm, &xcol)) + xcol.pixel = 0; + cachedest[cache_pos] = pixel = xcol.pixel; - if (++cache_pos >= CACHE_SIZE) { - cache_pos = 0; - all_cache = true; - } + if (++cache_pos >= CACHE_SIZE) { + cache_pos = 0; + all_cache = true; + } install: - XPutPixel(destimage, i, j, pixel); + XPutPixel(destimage, i, j, pixel); } XPutImage(dest_display, dest, destgc, destimage, 0, 0, destx, desty, w, h); diff --git a/src/motif/textctrl.cpp b/src/motif/textctrl.cpp index bba69ffa65..aad9c0b242 100644 --- a/src/motif/textctrl.cpp +++ b/src/motif/textctrl.cpp @@ -341,13 +341,13 @@ wxString wxTextCtrl::GetLineText(long lineNo) const for (i = 0; currentLine != lineNo && s[i]; i++ ) if (s[i] == '\n') currentLine++; - // Now get the text - int j; - for (j = 0; s[i] && s[i] != '\n'; i++, j++ ) - buf += s[i]; + // Now get the text + int j; + for (j = 0; s[i] && s[i] != '\n'; i++, j++ ) + buf += s[i]; - XtFree(s); - return buf; + XtFree(s); + return buf; } else return wxEmptyString; diff --git a/src/motif/window.cpp b/src/motif/window.cpp index fe91644faf..a3bb7b274f 100644 --- a/src/motif/window.cpp +++ b/src/motif/window.cpp @@ -1230,7 +1230,8 @@ void wxWindow::DoGetClientSize(int *x, int *y) const Widget widget = (Widget) GetClientWidget(); Dimension xx, yy; XtVaGetValues(widget, XmNwidth, &xx, XmNheight, &yy, NULL); - if(x) *x = xx; if(y) *y = yy; + if(x) *x = xx; + if(y) *y = yy; } void wxWindow::DoSetSize(int x, int y, int width, int height, int sizeFlags)