Fix indentation

This commit is contained in:
Will Storey 2019-02-18 10:47:08 -08:00
parent df532d4461
commit e793d7af9f
2 changed files with 5 additions and 5 deletions

View File

@ -63,7 +63,7 @@ int net_gethostbyname_nonblock(const char *addr, GIOChannel *pipe,
/* child */ /* child */
srand(time(NULL)); srand(time(NULL));
memset(&rec, 0, sizeof(rec)); memset(&rec, 0, sizeof(rec));
rec.error = net_gethostbyname(addr, &rec.ip4, &rec.ip6); rec.error = net_gethostbyname(addr, &rec.ip4, &rec.ip6);
if (rec.error == 0) { if (rec.error == 0) {
errorstr = NULL; errorstr = NULL;
@ -79,7 +79,7 @@ int net_gethostbyname_nonblock(const char *addr, GIOChannel *pipe,
rec.errlen = errorstr == NULL ? 0 : strlen(errorstr)+1; rec.errlen = errorstr == NULL ? 0 : strlen(errorstr)+1;
} }
g_io_channel_write_block(pipe, &rec, sizeof(rec)); g_io_channel_write_block(pipe, &rec, sizeof(rec));
if (rec.errlen != 0) if (rec.errlen != 0)
g_io_channel_write_block(pipe, (void *) errorstr, rec.errlen); g_io_channel_write_block(pipe, (void *) errorstr, rec.errlen);
else { else {
@ -129,7 +129,7 @@ int net_gethostbyname_return(GIOChannel *pipe, RESOLVED_IP_REC *rec)
/* read error string, if we can't read everything for some /* read error string, if we can't read everything for some
reason, just ignore it. */ reason, just ignore it. */
rec->errorstr = g_malloc0(rec->errlen+1); rec->errorstr = g_malloc0(rec->errlen+1);
g_io_channel_read_block(pipe, rec->errorstr, rec->errlen); g_io_channel_read_block(pipe, rec->errorstr, rec->errlen);
} else { } else {
if (rec->host4) { if (rec->host4) {
g_io_channel_read_block(pipe, &len, sizeof(int)); g_io_channel_read_block(pipe, &len, sizeof(int));
@ -170,7 +170,7 @@ static void simple_init(SIMPLE_THREAD_REC *rec, GIOChannel *handle)
if (net_geterror(handle) != 0) { if (net_geterror(handle) != 0) {
/* failed */ /* failed */
g_io_channel_shutdown(handle, TRUE, NULL); g_io_channel_shutdown(handle, TRUE, NULL);
g_io_channel_unref(handle); g_io_channel_unref(handle);
handle = NULL; handle = NULL;
} }

View File

@ -13,7 +13,7 @@ typedef struct {
} RESOLVED_IP_REC; } RESOLVED_IP_REC;
typedef struct { typedef struct {
int namelen; int namelen;
char *name; char *name;
int error; int error;