aboutsummaryrefslogtreecommitdiff
path: root/lib/xregcomp.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2012-11-13 17:14:08 -0600
committerRob Landley <rob@landley.net>2012-11-13 17:14:08 -0600
commit7aa651a6a4496d848f86de9b1e6b3a003256a01f (patch)
tree6995fb4b7cc2e90a6706b0239ebaf95d9dbab530 /lib/xregcomp.c
parent571b0706cce45716126776d0ad0f6ac65f4586e3 (diff)
downloadtoybox-7aa651a6a4496d848f86de9b1e6b3a003256a01f.tar.gz
Reindent to two spaces per level. Remove vi: directives that haven't worked right in years (ubuntu broke its' vim implementation). Remove trailing spaces. Add/remove blank lines. Re-wordwrap in places. Update documentation with new coding style.
The actual code should be the same afterward, this is just cosmetic refactoring.
Diffstat (limited to 'lib/xregcomp.c')
-rw-r--r--lib/xregcomp.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/lib/xregcomp.c b/lib/xregcomp.c
index 732ce4db..ec7d1b79 100644
--- a/lib/xregcomp.c
+++ b/lib/xregcomp.c
@@ -1,5 +1,4 @@
-/* vi: set ts=4:
- * Call regcomp() and handle errors.
+/* Call regcomp() and handle errors.
*
* Copyright 2007 Rob Landley <rob@landley.net>
*
@@ -12,12 +11,12 @@
void xregcomp(regex_t *preg, char *regex, int cflags)
{
- int rc = regcomp(preg, regex, cflags);
+ int rc = regcomp(preg, regex, cflags);
- if (rc) {
- char msg[256];
- regerror(rc, preg, msg, 255);
- msg[255]=0;
- error_exit("xregcomp: %s", msg);
- }
+ if (rc) {
+ char msg[256];
+ regerror(rc, preg, msg, 255);
+ msg[255]=0;
+ error_exit("xregcomp: %s", msg);
+ }
}