Skip to content
Snippets Groups Projects
Commit af7dbe61 authored by dprice's avatar dprice
Browse files

* modules.c (my_module): Clean up TRACE.

* subr.h [NULL2DOT, NULL2MT]: Add parens for safety.
parent 30001666
No related branches found
No related tags found
No related merge requests found
2008-10-02 Derek R. Price <derek@ximbiot.com>
* modules.c (my_module): Clean up TRACE.
* subr.h [NULL2DOT, NULL2MT]: Add parens for safety.
2008-09-30 Derek R. Price <derek@ximbiot.com> 2008-09-30 Derek R. Price <derek@ximbiot.com>
   
* checkout.c (preload_update_dir): Eliminate global. It was used in * checkout.c (preload_update_dir): Eliminate global. It was used in
......
...@@ -143,8 +143,8 @@ my_module (DBM *db, char *mname, enum mtype m_type, char *msg, ...@@ -143,8 +143,8 @@ my_module (DBM *db, char *mname, enum mtype m_type, char *msg,
#endif #endif
TRACE (TRACE_FUNCTION, "my_module (%s, %s, %s, %s)", TRACE (TRACE_FUNCTION, "my_module (%s, %s, %s, %s)",
mname ? mname : "(null)", msg ? msg : "(null)", TRACE_NULL (mname), TRACE_NULL (msg),
where ? where : "NULL", extra_arg ? extra_arg : "NULL"); TRACE_NULL (where), TRACE_NULL (extra_arg));
/* Don't process absolute directories. Anything else could be a security /* Don't process absolute directories. Anything else could be a security
* problem. Before this check was put in place: * problem. Before this check was put in place:
......
...@@ -176,10 +176,10 @@ strneq (const char *a, const char *b, size_t n) ...@@ -176,10 +176,10 @@ strneq (const char *a, const char *b, size_t n)
/* Convenience macro for printing the commonly used but sometimes empty /* Convenience macro for printing the commonly used but sometimes empty
* UPDATE_DIR string. * UPDATE_DIR string.
*/ */
#define NULL2DOT(u) (u && *u ? u : ".") #define NULL2DOT(u) ((u) && *(u) ? (u) : ".")
/* Convenience macro for equating a NULL pointer and the empty string. */ /* Convenience macro for equating a NULL pointer and the empty string. */
#define NULL2MT(s) (s ? s : "") #define NULL2MT(s) ((s) ? (s) : "")
/* Replace pointer D with S, freeing D afterwards. This is useful when S /* Replace pointer D with S, freeing D afterwards. This is useful when S
* is an expression containing D. * is an expression containing D.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment