summaryrefslogtreecommitdiff
path: root/util/nvramtool/reg_expr.c
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2010-01-13 21:00:23 +0000
committerStefan Reinauer <stepan@openbios.org>2010-01-13 21:00:23 +0000
commit90b96b68e0fedbc1d76e8547cad39c57021d5119 (patch)
tree115d59e288347288b4ab1fa913bc783383a55805 /util/nvramtool/reg_expr.c
parent766db7ea09addca79d91436cb7ac06a9bff491a5 (diff)
indent all of nvramtool to make it fit into coreboot's
coding style Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5007 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/nvramtool/reg_expr.c')
-rw-r--r--util/nvramtool/reg_expr.c58
1 files changed, 30 insertions, 28 deletions
diff --git a/util/nvramtool/reg_expr.c b/util/nvramtool/reg_expr.c
index 0f9ff46120..e737504d90 100644
--- a/util/nvramtool/reg_expr.c
+++ b/util/nvramtool/reg_expr.c
@@ -37,44 +37,46 @@
*
* Compile a bunch of regular expressions.
****************************************************************************/
-void compile_reg_exprs (int cflags, int num_exprs,
- /* const char *expr1, regex_t *reg1, */ ...)
- { static const size_t ERROR_BUF_SIZE = 256;
- char error_msg[ERROR_BUF_SIZE];
- va_list ap;
- regex_t *reg;
- const char *expr;
- int i, result;
+void compile_reg_exprs(int cflags, int num_exprs,
+ /* const char *expr1, regex_t *reg1, */ ...)
+{
+ static const size_t ERROR_BUF_SIZE = 256;
+ char error_msg[ERROR_BUF_SIZE];
+ va_list ap;
+ regex_t *reg;
+ const char *expr;
+ int i, result;
- va_start(ap, num_exprs);
+ va_start(ap, num_exprs);
- for (i = 0; i < num_exprs; i++)
- { expr = va_arg(ap, const char *);
- reg = va_arg(ap, regex_t *);
+ for (i = 0; i < num_exprs; i++) {
+ expr = va_arg(ap, const char *);
+ reg = va_arg(ap, regex_t *);
- if ((result = regcomp(reg, expr, cflags)) != 0)
- { regerror(result, reg, error_msg, ERROR_BUF_SIZE);
- fprintf(stderr, "%s: %s\n", prog_name, error_msg);
- exit(1);
- }
- }
+ if ((result = regcomp(reg, expr, cflags)) != 0) {
+ regerror(result, reg, error_msg, ERROR_BUF_SIZE);
+ fprintf(stderr, "%s: %s\n", prog_name, error_msg);
+ exit(1);
+ }
+ }
- va_end(ap);
- }
+ va_end(ap);
+}
/****************************************************************************
* free_reg_exprs
*
* Destroy a bunch of previously compiled regular expressions.
****************************************************************************/
-void free_reg_exprs (int num_exprs, /* regex_t *reg1, */ ...)
- { va_list ap;
- int i;
+void free_reg_exprs(int num_exprs, /* regex_t *reg1, */ ...)
+{
+ va_list ap;
+ int i;
- va_start(ap, num_exprs);
+ va_start(ap, num_exprs);
- for (i = 0; i < num_exprs; i++)
- regfree(va_arg(ap, regex_t *));
+ for (i = 0; i < num_exprs; i++)
+ regfree(va_arg(ap, regex_t *));
- va_end(ap);
- }
+ va_end(ap);
+}