style cleanup
[citadel.git] / citadel / server / room_ops.c
index 5061ed55ef5a7d94c249bb6ff6229acab11e074a..f9d82bf6ededaa56bce6f00945954f7102ee229e 100644 (file)
@@ -1,6 +1,6 @@
 // Server functions which perform operations on room objects.
 //
-// Copyright (c) 1987-2023 by the citadel.org team
+// Copyright (c) 1987-2024 by the citadel.org team
 //
 // This program is open source software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License, version 3.
@@ -212,14 +212,12 @@ void CtdlRoomAccess(struct ctdlroom *roombuf, struct ctdluser *userbuf, int *res
                        retval = retval | UA_REPLYALLOWED;
                }
 
-               // If "collaborative deletion" is active for this room, any user who can post
-               // is also allowed to delete
+               // If "collaborative deletion" is active for this room, any user who can post is also allowed to delete
                if (roombuf->QRflags2 & QR2_COLLABDEL) {
                        if (retval & UA_POSTALLOWED) {
                                retval = retval | UA_DELETEALLOWED;
                        }
                }
-
        }
 
        // Check to see if the user has forgotten this room
@@ -342,9 +340,7 @@ int CtdlGetRoomLock(struct ctdlroom *qrbuf, const char *room_name) {
        register int retval;
        retval = CtdlGetRoom(qrbuf, room_name);
        if (retval == 0) {
-               //syslog(LOG_ERR, "\033[33mCtdlGetRoomLock(%p) requested\033[0m", pthread_self());
                begin_critical_section(S_ROOMS);
-               //syslog(LOG_ERR, "\033[31mCtdlGetRoomLock(%p) acquired\033[0m", pthread_self());
        }
        return(retval);
 }
@@ -473,7 +469,7 @@ struct floor *CtdlGetCachedFloor(int floor_num) {
                for (i=0; i<MAXFLOORS; ++i) {
                        floorcache[floor_num] = NULL;
                }
-       initialized = 1;
+               initialized = 1;
        }
        if (floorcache[floor_num] == NULL) {
                fetch_new = 1;
@@ -505,9 +501,7 @@ void CtdlPutFloor(struct floor *flbuf, int floor_num) {
                memcpy(floorcache[floor_num], flbuf, sizeof(struct floor));
        }
        end_critical_section(S_FLOORCACHE);
-
-       cdb_store(CDB_FLOORTAB, &floor_num, sizeof(int),
-                 flbuf, sizeof(struct floor));
+       cdb_store(CDB_FLOORTAB, &floor_num, sizeof(int), flbuf, sizeof(struct floor));
 }