summaryrefslogtreecommitdiff
path: root/src/error.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2011-12-20 14:37:44 +0400
committerAndrey Nazarov <skuller@skuller.net>2012-04-03 01:25:47 +0400
commitb3e271a53de2610de173f9b2bda5d15dd4d78909 (patch)
treed567b91dadac42e168bcb13db5fe93ffbc7e1533 /src/error.c
parentca4a019a74b11aa21fea2a03c6dff3b183463aab (diff)
Massive coding style change.
Use linux style brackets. Pad operators with spaces. Unpad parenthesis, except for ‘if’, ‘for’, ‘while’ constructs.
Diffstat (limited to 'src/error.c')
-rw-r--r--src/error.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/error.c b/src/error.c
index 806177f..cf5c681 100644
--- a/src/error.c
+++ b/src/error.c
@@ -8,7 +8,7 @@ of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
@@ -49,25 +49,26 @@ static const char *const error_table[] = {
};
static const int num_errors =
- sizeof( error_table ) / sizeof( error_table[0] );
+ sizeof(error_table) / sizeof(error_table[0]);
-const char *Q_ErrorString( qerror_t error ) {
+const char *Q_ErrorString(qerror_t error)
+{
int e;
- if( error >= 0 ) {
+ if (error >= 0) {
return "Success";
}
- if( error > -ERRNO_MAX ) {
+ if (error > -ERRNO_MAX) {
#if EINVAL > 0
e = -error;
#else
e = error;
#endif
- return strerror( e );
+ return strerror(e);
}
- e = _Q_ERR( error );
+ e = _Q_ERR(error);
return error_table[e >= num_errors ? 0 : e];
}