MAINTENANCE: coding style
diff --git a/src/mod_netconf.c b/src/mod_netconf.c
index 49b02e5..56d1542 100644
--- a/src/mod_netconf.c
+++ b/src/mod_netconf.c
@@ -398,7 +398,7 @@
DEBUG("Before session_lock");
/* get exclusive access to sessions_list (conns) */
DEBUG("LOCK wrlock %s", __func__);
- if (pthread_rwlock_wrlock (&session_lock) != 0) {
+ if (pthread_rwlock_wrlock(&session_lock) != 0) {
nc_session_free(session);
free (locked_session);
DEBUG("Error while locking rwlock: %d (%s)", errno, strerror(errno));
@@ -635,7 +635,7 @@
/* get non-exclusive (read) access to sessions_list (conns) */
DEBUG("LOCK wrlock %s", __func__);
- if (pthread_rwlock_rdlock (&session_lock) != 0) {
+ if (pthread_rwlock_rdlock(&session_lock) != 0) {
DEBUG("Error while locking rwlock: %d (%s)", errno, strerror(errno));
res = create_error("Internal: Lock failed.");
data = NULL;
@@ -681,7 +681,7 @@
} else {
/* release lock on failure */
DEBUG("UNLOCK wrlock %s", __func__);
- if (pthread_rwlock_unlock (&session_lock) != 0) {
+ if (pthread_rwlock_unlock(&session_lock) != 0) {
DEBUG("Error while unlocking rwlock: %d (%s)", errno, strerror(errno));
}
DEBUG("Unknown session to process.");
@@ -2049,7 +2049,7 @@
/* send reply to caller */
if (reply != NULL) {
msgtext = json_object_to_json_string(reply);
- if (asprintf (&chunked_out_msg, "\n#%d\n%s\n##\n", (int)strlen(msgtext), msgtext) == -1) {
+ if (asprintf(&chunked_out_msg, "\n#%d\n%s\n##\n", (int) strlen(msgtext), msgtext) == -1) {
if (buffer != NULL) {
free(buffer);
buffer = NULL;
@@ -2147,7 +2147,7 @@
/* get exclusive access to sessions_list (conns) */
//DEBUG("LOCK wrlock %s", __func__);
- if ((ret = pthread_rwlock_wrlock (&session_lock)) != 0) {
+ if ((ret = pthread_rwlock_wrlock(&session_lock)) != 0) {
DEBUG("Error while locking rwlock: %d (%s)", ret, strerror(ret));
return;
}
@@ -2179,7 +2179,7 @@
}
/* get exclusive access to sessions_list (conns) */
//DEBUG("UNLOCK wrlock %s", __func__);
- if (pthread_rwlock_unlock (&session_lock) != 0) {
+ if (pthread_rwlock_unlock(&session_lock) != 0) {
DEBUG("Error while unlocking rwlock: %d (%s)", errno, strerror(errno));
}
}
diff --git a/src/notification-server.c b/src/notification-server.c
index be3e61a..ba039b2 100644
--- a/src/notification-server.c
+++ b/src/notification-server.c
@@ -623,7 +623,7 @@
}
//DEBUG("Callback server writeable.");
//DEBUG("lock session lock.");
- if (pthread_rwlock_wrlock (&session_lock) != 0) {
+ if (pthread_rwlock_wrlock(&session_lock) != 0) {
DEBUG("Error while unlocking rwlock: %d (%s)", errno, strerror(errno));
return -1;
}
@@ -638,7 +638,7 @@
return -1;
}
pthread_mutex_lock(&ls->lock);
- if (pthread_rwlock_unlock (&session_lock) != 0) {
+ if (pthread_rwlock_unlock(&session_lock) != 0) {
DEBUG("Error while unlocking rwlock: %d (%s)", errno, strerror(errno));
}
@@ -779,7 +779,7 @@
//dump_handshake_info(wsi);
/* you could return non-zero here and kill the connection */
break;
- //gives segfailt :-(
+ //gives segfault :-(
//case LWS_CALLBACK_CLOSED:
// if (pss->session_key != NULL) {
// free(pss->session_key);