Skip to content
Browse files

Remove whitespaces.

  • Loading branch information...
1 parent 94b9060 commit f7d993172d5df245f941278933651581c3799f7a @carlosbrando committed
Showing with 22 additions and 22 deletions.
  1. +13 −13 src/dbg.h
  2. +9 −9 tests/minunit.h
View
26 src/dbg.h
@@ -2,29 +2,29 @@
#define __dbg_h__
#include <stdio.h>
-#include <errno.h>
+#include <errno.h>
#include <string.h>
#ifdef NDEBUG
#define debug(M, ...)
-#else
-#define debug(M, ...) fprintf(stderr, "DEBUG %s:%d: " M "\n", __FILE__, __LINE__, ##__VA_ARGS__)
+#else
+#define debug(M, ...) fprintf(stderr, "DEBUG %s:%d: " M "\n", __FILE__, __LINE__, ##__VA_ARGS__)
#endif
#define clean_errno() (errno == 0 ? "None" : strerror(errno))
-
-#define log_err(M, ...) fprintf(stderr, "[ERROR] (%s:%d: errno: %s) " M "\n", __FILE__, __LINE__, clean_errno(), ##__VA_ARGS__)
-
-#define log_warn(M, ...) fprintf(stderr, "[WARN] (%s:%d: errno: %s) " M "\n", __FILE__, __LINE__, clean_errno(), ##__VA_ARGS__)
-
-#define log_info(M, ...) fprintf(stderr, "[INFO] (%s:%d) " M "\n", __FILE__, __LINE__, ##__VA_ARGS__)
-#define check(A, M, ...) if(!(A)) { log_err(M, ##__VA_ARGS__); errno=0; goto error; }
+#define log_err(M, ...) fprintf(stderr, "[ERROR] (%s:%d: errno: %s) " M "\n", __FILE__, __LINE__, clean_errno(), ##__VA_ARGS__)
-#define sentinel(M, ...) { log_err(M, ##__VA_ARGS__); errno=0; goto error; }
+#define log_warn(M, ...) fprintf(stderr, "[WARN] (%s:%d: errno: %s) " M "\n", __FILE__, __LINE__, clean_errno(), ##__VA_ARGS__)
+
+#define log_info(M, ...) fprintf(stderr, "[INFO] (%s:%d) " M "\n", __FILE__, __LINE__, ##__VA_ARGS__)
+
+#define check(A, M, ...) if(!(A)) { log_err(M, ##__VA_ARGS__); errno=0; goto error; }
+
+#define sentinel(M, ...) { log_err(M, ##__VA_ARGS__); errno=0; goto error; }
#define check_mem(A) check((A), "Out of memory.")
-
-#define check_debug(A, M, ...) if(!(A)) { debug(M, ##__VA_ARGS__); errno=0; goto error; }
+
+#define check_debug(A, M, ...) if(!(A)) { debug(M, ##__VA_ARGS__); errno=0; goto error; }
#endif
View
18 tests/minunit.h
@@ -13,18 +13,18 @@
message = test(); tests_run++; if (message) return message;
#define RUN_TESTS(name) int main(int argc, char *argv[]) {\
- argc = 1;\
+ argc = 1;\
debug("----- RUNNING: %s", argv[0]);\
printf("----\nRUNNING: %s\n", argv[0]);\
char *result = name();\
- if (result != 0) {\
- printf("FAILED: %s\n", result);\
- }\
- else {\
- printf("ALL TESTS PASSED\n");\
- }\
- printf("Tests run: %d\n", tests_run);\
- exit(result != 0);\
+ if (result != 0) {\
+ printf("FAILED: %s\n", result);\
+ }\
+ else {\
+ printf("ALL TESTS PASSED\n");\
+ }\
+ printf("Tests run: %d\n", tests_run);\
+ exit(result != 0);\
}

0 comments on commit f7d9931

Please sign in to comment.
Something went wrong with that request. Please try again.