]> git.sur5r.net Git - openocd/commitdiff
use assert instead of adding code that always runs
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Fri, 8 May 2009 08:49:24 +0000 (08:49 +0000)
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Fri, 8 May 2009 08:49:24 +0000 (08:49 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1670 b42882b7-edfa-0310-969c-e2dbd0fdcd60

src/jtag/jtag.c

index 68706141b502063e2312b5e1021920733c254022..e02b91f088d5d6a818232c7e2cc3a9de8ec2a1be 100644 (file)
@@ -41,6 +41,7 @@
 #ifdef HAVE_STRINGS_H
 #include <strings.h>
 #endif
+#include <assert.h>
 
 
 
@@ -1453,11 +1454,7 @@ void jtag_set_check_value(scan_field_t *field, u8 *value, u8 *mask, struct inval
 
 void jtag_check_value_mask(scan_field_t *field, u8 *value, u8 *mask)
 {
-       if (field->in_value==NULL)
-       {
-               LOG_ERROR("remember to fill in in_value for jtag_check_value_mask() to work!");
-               return;
-       }
+       assert(field->in_value != NULL);
 
        if (value==NULL)
        {