Some code smell fixes from sonarlint
This commit is contained in:
16
src/vnc.c
16
src/vnc.c
@@ -40,9 +40,11 @@
|
||||
static rfbScreenInfoPtr rfb = NULL;
|
||||
static int clients;
|
||||
static int updatingSize;
|
||||
static int allowedX,
|
||||
allowedY;
|
||||
static int ptr_x, ptr_y, ptr_but;
|
||||
static int allowedX;
|
||||
static int allowedY;
|
||||
static int ptr_x;
|
||||
static int ptr_y;
|
||||
static int ptr_but;
|
||||
|
||||
typedef struct {
|
||||
int buttons;
|
||||
@@ -174,7 +176,7 @@ vnc_newclient(rfbClientPtr cl)
|
||||
}
|
||||
|
||||
/* For now, we always accept clients. */
|
||||
return (RFB_CLIENT_ACCEPT);
|
||||
return RFB_CLIENT_ACCEPT;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -194,14 +196,12 @@ vnc_display(rfbClientPtr cl)
|
||||
static void
|
||||
vnc_blit(int x, int y, int w, int h, int monitor_index)
|
||||
{
|
||||
int row;
|
||||
|
||||
if (monitor_index || (x < 0) || (y < 0) || (w < VNC_MIN_X) || (h < VNC_MIN_Y) || (w > VNC_MAX_X) || (h > VNC_MAX_Y) || (buffer32 == NULL)) {
|
||||
video_blit_complete_monitor(monitor_index);
|
||||
return;
|
||||
}
|
||||
|
||||
for (row = 0; row < h; ++row)
|
||||
for (int row = 0; row < h; ++row)
|
||||
video_copy(&(((uint8_t *) rfb->frameBuffer)[row * 2048 * sizeof(uint32_t)]), &(buffer32->line[y + row][x]), w * sizeof(uint32_t));
|
||||
|
||||
if (screenshots)
|
||||
@@ -267,7 +267,7 @@ vnc_init(UNUSED(void *arg))
|
||||
|
||||
vnc_log("VNC: init complete.\n");
|
||||
|
||||
return (1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user