tcl/target/stm32(f7/h7)x: do not assume presence of the reset
[fw/openocd] / src / helper / binarybuffer.c
index 44d139f58dd90fdf4d3ed4e2584fc90d36d81eee..e2dfa87b606aeafdb1fb04459291947117516991 100644 (file)
@@ -23,6 +23,7 @@
 #include "config.h"
 #endif
 
+#include "helper/replacements.h"
 #include "log.h"
 #include "binarybuffer.h"
 
@@ -52,7 +53,7 @@ static const char hex_digits[] = {
 
 void *buf_cpy(const void *from, void *_to, unsigned size)
 {
-       if (NULL == from || NULL == _to)
+       if (!from || !_to)
                return NULL;
 
        /* copy entire buffer */
@@ -221,7 +222,7 @@ static void str_radix_guess(const char **_str, unsigned *_str_len,
        unsigned *_radix)
 {
        unsigned radix = *_radix;
-       if (0 != radix)
+       if (radix != 0)
                return;
        const char *str = *_str;
        unsigned str_len = *_str_len;