]> git.ipfire.org Git - thirdparty/FORT-validator.git/commitdiff
Minor fixes: add a couple of spaces, and 'pr_crit' at thread errors
authorpcarana <pc.moreno2099@gmail.com>
Thu, 1 Oct 2020 17:31:17 +0000 (12:31 -0500)
committerpcarana <pc.moreno2099@gmail.com>
Thu, 1 Oct 2020 17:31:17 +0000 (12:31 -0500)
src/common.c
src/object/tal.c
src/resource/asn.c

index 85d86893b5b4be277abac12bf3b2b1b0e6b45721..fa1a168523a208bb1ee8ec6c4c6d17c5e8edf15b 100644 (file)
@@ -34,9 +34,8 @@ rwlock_read_lock(pthread_rwlock_t *lock)
         * pthread_rwlock_rdlock() failing like this is akin to `if` failing;
         * we're screwed badly, so let's just pull the trigger.
         */
-       pr_op_err("pthread_rwlock_rdlock() returned error code %d. This is too critical for a graceful recovery; I must die now.",
+       pr_crit("pthread_rwlock_rdlock() returned error code %d. This is too critical for a graceful recovery; I must die now.",
            error);
-       exit(error);
 }
 
 void
@@ -49,11 +48,9 @@ rwlock_write_lock(pthread_rwlock_t *lock)
         * Both of them indicate serious programming errors.
         */
        error = pthread_rwlock_wrlock(lock);
-       if (error) {
-               pr_op_err("pthread_rwlock_wrlock() returned error code %d. This is too critical for a graceful recovery; I must die now.",
+       if (error)
+               pr_crit("pthread_rwlock_wrlock() returned error code %d. This is too critical for a graceful recovery; I must die now.",
                    error);
-               exit(error);
-       }
 }
 
 void
@@ -66,11 +63,9 @@ rwlock_unlock(pthread_rwlock_t *lock)
         * Both of them indicate serious programming errors.
         */
        error = pthread_rwlock_unlock(lock);
-       if (error) {
-               pr_op_err("pthread_rwlock_unlock() returned error code %d. This is too critical for a graceful recovery; I must die now.",
+       if (error)
+               pr_crit("pthread_rwlock_unlock() returned error code %d. This is too critical for a graceful recovery; I must die now.",
                    error);
-               exit(error);
-       }
 }
 
 void
index f50bfe891ed10a8c419539fd40d023b3614dd7c2..f18ee4703e55915cc2041ceeb37ab3182e98372b 100644 (file)
@@ -208,7 +208,7 @@ locate_char(char *str, size_t len, char find)
 {
        size_t i;
 
-       for(i = 0; i < len; i++)
+       for (i = 0; i < len; i++)
                if (str[i] == find)
                        return str + i;
        return NULL;
index 62e5757d24360f5975cbef6bd6fcd34f24a75222..c80fa89841f893445bc4d515c8210e9ff7b71d2b 100644 (file)
@@ -89,7 +89,7 @@ asn_node_cb(void *elem, void *arg)
        unsigned long index;
        int error;
 
-       for(index = node->min; index <= node->max; index++) {
+       for (index = node->min; index <= node->max; index++) {
                error = param->cb(index, param->arg);
                if (error)
                        return error;