Skip to content

Commit

Permalink
vnc: add missing static
Browse files Browse the repository at this point in the history
Add missing 'static' qualifiers.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
  • Loading branch information
blueswirl authored and stefanhaRH committed Nov 1, 2012
1 parent 4fdcac0 commit 71a8cde
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 20 deletions.
2 changes: 0 additions & 2 deletions console.h
Expand Up @@ -377,10 +377,8 @@ void cocoa_display_init(DisplayState *ds, int full_screen);

/* vnc.c */
void vnc_display_init(DisplayState *ds);
void vnc_display_close(DisplayState *ds);
void vnc_display_open(DisplayState *ds, const char *display, Error **errp);
void vnc_display_add_client(DisplayState *ds, int csock, int skipauth);
int vnc_display_disable_login(DisplayState *ds);
char *vnc_display_local_addr(DisplayState *ds);
#ifdef CONFIG_VNC
int vnc_display_password(DisplayState *ds, const char *password);
Expand Down
10 changes: 5 additions & 5 deletions ui/vnc-jobs.c
Expand Up @@ -320,6 +320,11 @@ static void *vnc_worker_thread(void *arg)
return NULL;
}

static bool vnc_worker_thread_running(void)
{
return queue; /* Check global queue */
}

void vnc_start_worker_thread(void)
{
VncJobQueue *q;
Expand All @@ -332,11 +337,6 @@ void vnc_start_worker_thread(void)
queue = q; /* Set global queue */
}

bool vnc_worker_thread_running(void)
{
return queue; /* Check global queue */
}

void vnc_stop_worker_thread(void)
{
if (!vnc_worker_thread_running())
Expand Down
1 change: 0 additions & 1 deletion ui/vnc-jobs.h
Expand Up @@ -40,7 +40,6 @@ void vnc_jobs_join(VncState *vs);

void vnc_jobs_consume_buffer(VncState *vs);
void vnc_start_worker_thread(void);
bool vnc_worker_thread_running(void);
void vnc_stop_worker_thread(void);

/* Locks */
Expand Down
14 changes: 7 additions & 7 deletions ui/vnc.c
Expand Up @@ -479,12 +479,12 @@ void buffer_reserve(Buffer *buffer, size_t len)
}
}

int buffer_empty(Buffer *buffer)
static int buffer_empty(Buffer *buffer)
{
return buffer->offset == 0;
}

uint8_t *buffer_end(Buffer *buffer)
static uint8_t *buffer_end(Buffer *buffer)
{
return buffer->buffer + buffer->offset;
}
Expand Down Expand Up @@ -1376,17 +1376,17 @@ void vnc_flush(VncState *vs)
vnc_unlock_output(vs);
}

uint8_t read_u8(uint8_t *data, size_t offset)
static uint8_t read_u8(uint8_t *data, size_t offset)
{
return data[offset];
}

uint16_t read_u16(uint8_t *data, size_t offset)
static uint16_t read_u16(uint8_t *data, size_t offset)
{
return ((data[offset] & 0xFF) << 8) | (data[offset + 1] & 0xFF);
}

int32_t read_s32(uint8_t *data, size_t offset)
static int32_t read_s32(uint8_t *data, size_t offset)
{
return (int32_t)((data[offset] << 24) | (data[offset + 1] << 16) |
(data[offset + 2] << 8) | data[offset + 3]);
Expand Down Expand Up @@ -2763,7 +2763,7 @@ void vnc_display_init(DisplayState *ds)
}


void vnc_display_close(DisplayState *ds)
static void vnc_display_close(DisplayState *ds)
{
VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display;

Expand All @@ -2785,7 +2785,7 @@ void vnc_display_close(DisplayState *ds)
#endif
}

int vnc_display_disable_login(DisplayState *ds)
static int vnc_display_disable_login(DisplayState *ds)
{
VncDisplay *vs = ds ? (VncDisplay *)ds->opaque : vnc_display;

Expand Down
5 changes: 0 additions & 5 deletions ui/vnc.h
Expand Up @@ -493,9 +493,6 @@ void vnc_read_when(VncState *vs, VncReadEvent *func, size_t expecting);


/* Buffer I/O functions */
uint8_t read_u8(uint8_t *data, size_t offset);
uint16_t read_u16(uint8_t *data, size_t offset);
int32_t read_s32(uint8_t *data, size_t offset);
uint32_t read_u32(uint8_t *data, size_t offset);

/* Protocol stage functions */
Expand All @@ -507,8 +504,6 @@ void start_auth_vnc(VncState *vs);

/* Buffer management */
void buffer_reserve(Buffer *buffer, size_t len);
int buffer_empty(Buffer *buffer);
uint8_t *buffer_end(Buffer *buffer);
void buffer_reset(Buffer *buffer);
void buffer_free(Buffer *buffer);
void buffer_append(Buffer *buffer, const void *data, size_t len);
Expand Down

0 comments on commit 71a8cde

Please sign in to comment.