Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use gint instead of int.

  • Loading branch information...
commit ac82ceda9c39bb8a4d310b8efb170e40cf102ba9 1 parent 9fb6442
@sionescu authored
Showing with 8 additions and 8 deletions.
  1. +4 −4 src/server/io.c
  2. +4 −4 src/server/lexecd.c
View
8 src/server/io.c
@@ -59,7 +59,7 @@ lx_write(gint fd, gpointer buf, gsize len)
}
}
-int
+gint
lx_write_full(gint fd, gpointer buf, gsize len)
{
gint octets_written = 0;
@@ -83,7 +83,7 @@ lx_read_stream_into_buffer(int fd, RxBuffer *buf, GError **error)
gint32 total_length;
gsize datalen = sizeof(gint32);
- int noctets = lx_read_full(fd, &total_length, datalen);
+ gint noctets = lx_read_full(fd, &total_length, datalen);
if (noctets < 0) {
LX_ERROR_SYSCALL(error);
@@ -99,8 +99,8 @@ lx_read_stream_into_buffer(int fd, RxBuffer *buf, GError **error)
g_byte_array_set_size(buf->array, total_length);
lx_read_full(fd, buf->array->data, total_length);
g_printf(" values:%d,%d,%d,%d",
- (int)buf->array->data[0], (int)buf->array->data[1],
- (int)buf->array->data[2], (int)buf->array->data[3]);
+ (gint)buf->array->data[0], (gint)buf->array->data[1],
+ (gint)buf->array->data[2], (gint)buf->array->data[3]);
return buf;
}
View
8 src/server/lexecd.c
@@ -22,7 +22,7 @@ void print_str(gpointer str, gpointer user_data)
int main(int argc, char *argv[])
{
g_printf("Socket: create");
- int server_socket = socket(PF_UNIX, SOCK_STREAM, 0);
+ gint server_socket = socket(PF_UNIX, SOCK_STREAM, 0);
struct sockaddr_un server_address = { AF_UNIX, "\0init_console" };
g_printf(" bind");
@@ -35,9 +35,9 @@ int main(int argc, char *argv[])
struct sockaddr_un client_address;
socklen_t client_address_length = sizeof client_address;
g_printf(" accept");
- int client_connection = accept(server_socket,
- (struct sockaddr *) &client_address,
- &client_address_length);
+ gint client_connection = accept(server_socket,
+ (struct sockaddr *) &client_address,
+ &client_address_length);
g_printf(" close");
close(server_socket);
Please sign in to comment.
Something went wrong with that request. Please try again.