aboutsummaryrefslogtreecommitdiff
path: root/gas/cond.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas/cond.c')
-rw-r--r--gas/cond.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/gas/cond.c b/gas/cond.c
index c14399d..56e8c72 100644
--- a/gas/cond.c
+++ b/gas/cond.c
@@ -110,8 +110,7 @@ s_ifdef (int test_defined)
cframe.ignoring = ! (test_defined ^ is_defined);
}
- current_cframe =
- (struct conditional_frame *) obstack_alloc (&cond_obstack, sizeof cframe);
+ current_cframe = obstack_alloc (&cond_obstack, sizeof cframe);
memcpy (current_cframe, &cframe, sizeof cframe);
if (LISTING_SKIP_COND ()
@@ -168,8 +167,7 @@ s_if (int arg)
using an undefined result. No big deal. */
initialize_cframe (&cframe);
cframe.ignoring = cframe.dead_tree || ! t;
- current_cframe =
- (struct conditional_frame *) obstack_alloc (&cond_obstack, sizeof cframe);
+ current_cframe = obstack_alloc (&cond_obstack, sizeof cframe);
memcpy (current_cframe, & cframe, sizeof cframe);
if (LISTING_SKIP_COND ()
@@ -205,8 +203,7 @@ s_ifb (int test_blank)
cframe.ignoring = (test_blank == !is_eol);
}
- current_cframe =
- (struct conditional_frame *) obstack_alloc (&cond_obstack, sizeof cframe);
+ current_cframe = obstack_alloc (&cond_obstack, sizeof cframe);
memcpy (current_cframe, &cframe, sizeof cframe);
if (LISTING_SKIP_COND ()
@@ -286,8 +283,7 @@ s_ifc (int arg)
initialize_cframe (&cframe);
cframe.ignoring = cframe.dead_tree || ! (res ^ arg);
- current_cframe =
- (struct conditional_frame *) obstack_alloc (&cond_obstack, sizeof cframe);
+ current_cframe = obstack_alloc (&cond_obstack, sizeof cframe);
memcpy (current_cframe, &cframe, sizeof cframe);
if (LISTING_SKIP_COND ()
@@ -348,7 +344,7 @@ s_elseif (int arg)
if (operand.X_op != O_constant)
as_bad (_("non-constant expression in \".elseif\" statement"));
- switch ((operatorT) arg)
+ switch (arg)
{
case O_eq: t = operand.X_add_number == 0; break;
case O_ne: t = operand.X_add_number != 0; break;
@@ -481,8 +477,7 @@ s_ifeqs (int arg)
initialize_cframe (&cframe);
cframe.ignoring = cframe.dead_tree || ! (res ^ arg);
- current_cframe =
- (struct conditional_frame *) obstack_alloc (&cond_obstack, sizeof cframe);
+ current_cframe = obstack_alloc (&cond_obstack, sizeof cframe);
memcpy (current_cframe, &cframe, sizeof cframe);
if (LISTING_SKIP_COND ()
@@ -509,7 +504,7 @@ ignore_input (void)
else
{
if (s[-1] != '.')
- return (current_cframe != NULL) && (current_cframe->ignoring);
+ return current_cframe != NULL && current_cframe->ignoring;
}
/* We cannot ignore certain pseudo ops. */
@@ -531,15 +526,14 @@ ignore_input (void)
break;
}
- return (current_cframe != NULL) && (current_cframe->ignoring);
+ return current_cframe != NULL && current_cframe->ignoring;
}
static void
initialize_cframe (struct conditional_frame *cframe)
{
memset (cframe, 0, sizeof (*cframe));
- cframe->if_file_line.file
- = as_where (&cframe->if_file_line.line);
+ cframe->if_file_line.file = as_where (&cframe->if_file_line.line);
cframe->previous_cframe = current_cframe;
cframe->dead_tree = current_cframe != NULL && current_cframe->ignoring;
cframe->macro_nest = macro_nest;