Commit 9390b852 authored by yb9976's avatar yb9976
Browse files

Add space after 'switch'.

parent f3086f26
......@@ -61,7 +61,7 @@
*/
#define COMPILETIME_ASSERT(x, name) \
static UNUSED void compiletime_assert_##name (int h) { \
switch(h) { case 0: case (x): {} } \
switch (h) { case 0: case (x): {} } \
}
#endif
......@@ -1103,7 +1103,7 @@ static ir_node *gen_Proj_Div(ir_node *const node)
else
mode = mode_gp;
switch((pn_Div)pn) {
switch ((pn_Div)pn) {
case pn_Div_M:
return new_r_Proj(new_pred, mode_M, pn_amd64_Div_M);
case pn_Div_res:
......@@ -1132,7 +1132,7 @@ static ir_node *gen_Proj_Mod(ir_node *const node)
assert((long)pn_amd64_Div_M == (long)pn_amd64_IDiv_M);
assert((long)pn_amd64_Div_res_mod == (long)pn_amd64_IDiv_res_mod);
switch((pn_Mod)pn) {
switch ((pn_Mod)pn) {
case pn_Mod_M:
return new_r_Proj(new_pred, mode_M, pn_amd64_Div_M);
case pn_Mod_res:
......@@ -2015,7 +2015,7 @@ static ir_node *gen_Store(ir_node *node)
bool need_xmm = mode_is_float(mode);
switch(arity) {
switch (arity) {
case 1: reqs = mem_reqs; break;
case 2: reqs = need_xmm ? xmm_mem_reqs : reg_mem_reqs; break;
case 3: reqs = need_xmm ? xmm_reg_mem_reqs : reg_reg_mem_reqs; break;
......@@ -2253,7 +2253,7 @@ static ir_node *gen_Builtin(ir_node *node)
{
ir_builtin_kind kind = get_Builtin_kind(node);
switch(kind) {
switch (kind) {
case ir_bk_saturating_increment:
return gen_saturating_increment(node);
default:
......@@ -2268,7 +2268,7 @@ static ir_node *gen_Proj_Builtin(ir_node *proj)
ir_node *new_node = be_transform_node(node);
ir_builtin_kind kind = get_Builtin_kind(node);
switch(kind) {
switch (kind) {
case ir_bk_saturating_increment:
return new_r_Proj(new_node, mode_gp, pn_amd64_Sbb_res);
default:
......
......@@ -348,7 +348,7 @@ void lpp_check_startvals(lpp_t *lpp)
sum += lpp->vars[var_idx]->value *
matrix_get(lpp->m, cst_idx, var_idx);
}
switch(cst->type.cst_type) {
switch (cst->type.cst_type) {
case lpp_equal:
if(sum != cst_val) {
fprintf(stderr, "constraint %s unsatisfied: %g != %g\n", cst->name, sum, cst_val);
......@@ -386,7 +386,7 @@ void lpp_set_log(lpp_t *lpp, FILE *log)
static const char *lpp_cst_op_to_str(lpp_cst_t cst)
{
switch(cst) {
switch (cst) {
case lpp_equal:
return "=";
case lpp_less_equal:
......
......@@ -366,7 +366,7 @@ int lpp_ack(lpp_comm_t *comm, char *buf, size_t buflen)
int res = 0;
int cmd = lpp_readl(comm);
switch(cmd) {
switch (cmd) {
case LPP_CMD_OK:
res = 1;
break;
......@@ -403,7 +403,7 @@ void lpp_send_ack(lpp_comm_t *comm)
const char *lpp_get_cmd_name(int cmd)
{
switch(cmd) {
switch (cmd) {
case LPP_CMD_BAD: return "BAD";
case LPP_CMD_OK: return "OK";
case LPP_CMD_PROBLEM: return "PROBLEM";
......
......@@ -186,7 +186,7 @@ void lpp_solve_net(lpp_t *lpp, const char *host, const char *solver)
ready = 0;
while (! ready) {
int cmd = lpp_readl(comm);
switch(cmd) {
switch (cmd) {
case LPP_CMD_SOLUTION:
ir_timer_push(t_recv);
lpp_deserialize_stats(comm, lpp);
......
......@@ -285,7 +285,7 @@ static void kill_and_reduce_usage(ir_node *node)
{
ir_node *ptr;
ir_node *value;
switch(get_irn_opcode(node)) {
switch (get_irn_opcode(node)) {
case iro_Load:
ptr = get_Load_ptr(node);
value = NULL;
......
......@@ -251,7 +251,7 @@ static int solve(lpp_comm_t *comm, job_t *job)
//break;
}
switch(cmd) {
switch (cmd) {
/* eat senseless data. */
default:
while(read(fd_comm, &cmd, sizeof(cmd)) > 0) {
......@@ -291,7 +291,7 @@ static void *session(int fd)
DBG((dbg, LEVEL_2, "command: %s(%d)\n", lpp_get_cmd_name(cmd), cmd));
setproctitle("lpp_server [command %s(%d)]", lpp_get_cmd_name(cmd), cmd);
switch(cmd) {
switch (cmd) {
/* we could not read from the socket, so the connection died. bail out. */
case -1:
case LPP_CMD_BAD:
......@@ -419,7 +419,7 @@ static void main_loop(void)
}
child = fork();
switch(child) {
switch (child) {
case 0: /* we're in the new child, start the session handler */
close(msock);
session(csock);
......@@ -465,7 +465,7 @@ int main(int argc, char *argv[])
/* parse options. */
while((c = getopt(argc, argv, "s:g:")) != -1) {
switch(c) {
switch (c) {
case 's':
set_solver_stack_size(atoi(optarg));
break;
......
......@@ -134,7 +134,7 @@ static int ack(int fd, size_t buflen, char *buf)
int res = 0;
int cmd = readl(fd);
switch(cmd) {
switch (cmd) {
case LPP_CMD_OK:
res = 1;
break;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment