Remove trailing whitespace.

This commit is contained in:
Tim 'mithro' Ansell 2020-04-12 10:29:13 -07:00
parent 5a0bb6ee01
commit 97d0c525ee
5 changed files with 24 additions and 24 deletions

View File

@ -20,7 +20,7 @@ int litex_sim_register_ext_module(struct ext_module_s *mod)
{
int ret=RC_OK;
struct ext_module_list_s *ml=NULL;
if(!mod)
{
eprintf("Invalid arguments\n");
@ -81,7 +81,7 @@ int litex_sim_load_ext_modules(struct ext_module_list_s **mlist)
eprintf("Can't load library %s\n", libdylib_last_error());
goto out;
}
if(!libdylib_find(lib, "litex_sim_ext_module_init"))
{
ret = RC_ERROR;

View File

@ -60,7 +60,7 @@ static int clocker_new(void **sess, char *args)
out:
*sess=(void*)s;
return ret;
return ret;
}
static int clocker_add_pads(void *sess, struct pad_list_s *plist)
@ -74,7 +74,7 @@ static int clocker_add_pads(void *sess, struct pad_list_s *plist)
goto out;
}
pads = plist->pads;
if(!strcmp(plist->name, "sys_clk")) {
litex_sim_module_pads_get(pads, "sys_clk", (void**)&s->sys_clk);
}

View File

@ -97,9 +97,9 @@ void read_handler(int fd, short event, void *arg)
struct session_s *s = (struct session_s*)arg;
char buffer[1024];
ssize_t read_len;
int i;
read_len = read(fd, buffer, 1024);
for(i = 0; i < read_len; i++)
{
@ -118,10 +118,10 @@ static void accept_conn_cb(struct evconnlistener *listener, evutil_socket_t fd,
{
struct session_s *s = (struct session_s*)ctx;
struct timeval tv = {1, 0};
s->fd = fd;
s->ev = event_new(base, fd, EV_READ | EV_PERSIST , event_handler, s);
event_add(s->ev, &tv);
event_add(s->ev, &tv);
}
static void
@ -159,7 +159,7 @@ static int serial2tcp_new(void **sess, char *args)
fprintf(stderr, "Invalid port selected!\n");
goto out;
}
s=(struct session_s*)malloc(sizeof(struct session_s));
if(!s) {
ret = RC_NOENMEM;
@ -177,8 +177,8 @@ static int serial2tcp_new(void **sess, char *args)
eprintf("Can't bind port %d\n!\n", port);
goto out;
}
evconnlistener_set_error_cb(listener, accept_error_cb);
evconnlistener_set_error_cb(listener, accept_error_cb);
out:
*sess=(void*)s;
return ret;
@ -202,19 +202,19 @@ static int serial2tcp_add_pads(void *sess, struct pad_list_s *plist)
litex_sim_module_pads_get(pads, "source_valid", (void**)&s->tx_valid);
litex_sim_module_pads_get(pads, "source_ready", (void**)&s->tx_ready);
}
if(!strcmp(plist->name, "sys_clk"))
litex_sim_module_pads_get(pads, "sys_clk", (void**)&s->sys_clk);
out:
return ret;
}
static int serial2tcp_tick(void *sess)
{
char c;
int ret = RC_OK;
struct session_s *s = (struct session_s*)sess;
if(*s->sys_clk == 0)
return RC_OK;
@ -228,7 +228,7 @@ static int serial2tcp_tick(void *sess)
goto out;
}
}
*s->rx_valid=0;
if(s->datalen) {
*s->rx=s->databuf[s->data_start];
@ -236,7 +236,7 @@ static int serial2tcp_tick(void *sess)
s->datalen--;
*s->rx_valid=1;
}
out:
return ret;
}

View File

@ -17,7 +17,7 @@ int litex_sim_register_pads(struct pad_s *pads, char *interface_name, int index)
{
ret = RC_INVARG;
eprintf("Invalid argument\n");
goto out;
goto out;
}
pl = (struct pad_list_s *)malloc(sizeof(struct pad_list_s));
@ -36,7 +36,7 @@ int litex_sim_register_pads(struct pad_s *pads, char *interface_name, int index)
pl->next = padlist;
padlist = pl;
out:
return ret;
}
@ -45,7 +45,7 @@ int litex_sim_pads_get_list(struct pad_list_s **plist)
{
int ret=RC_OK;
if(!plist)
{
ret = RC_INVARG;

View File

@ -99,7 +99,7 @@ static int json_to_interface_list(json_object *interface, struct interface_s **i
json_object *obj;
json_object *name;
json_object *index;
struct interface_s *t_iface=NULL;
if(!interface || !iface)
@ -108,7 +108,7 @@ static int json_to_interface_list(json_object *interface, struct interface_s **i
eprintf("Invalid argument\n");
goto out;
}
if(!json_object_is_type(interface, json_type_array))
{
ret=RC_JSERROR;
@ -166,7 +166,7 @@ out:
static int module_list_free(struct module_s *mod)
{
int ret=RC_OK;
int ret=RC_OK;
struct module_s *mnext;
int i;
while(mod)
@ -247,7 +247,7 @@ static int json_to_module_list(json_object *obj, struct module_s **mod)
tickfirst=NULL;
json_object_object_get_ex(tobj, "tickfirst", &tickfirst);
if(m)
{
@ -275,7 +275,7 @@ static int json_to_module_list(json_object *obj, struct module_s **mod)
goto out;
}
len = 0;
while(m->iface[len++].name);
m->niface= len-1;
m->name = strdup(json_object_get_string(name));