Skip to content

Commit 0acb129

Browse files
committed
Remove defunct bqeue alloc functions
1 parent 243a75d commit 0acb129

2 files changed

Lines changed: 2 additions & 15 deletions

File tree

src/mux/commands/command_queue.c

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,6 @@
2727
#include "mux/world/player_cache.h"
2828
#include "mux/world/world_context.h"
2929

30-
struct bque *alloc_qentry(const char *s) {
31-
return (struct bque *)malloc(sizeof(struct bque));
32-
}
33-
34-
void free_qentry(struct bque *b) {
35-
if (b)
36-
free(b);
37-
}
38-
3930
struct CommandQueue {
4031
CommandRuntime *command_runtime;
4132
BtechContext *btech;
@@ -111,7 +102,7 @@ void command_queue_destroy(CommandQueue *queue) {
111102
static void cque_free_entry(BQUE *entry) {
112103
if (entry->timer != nullptr)
113104
mux_timer_destroy(entry->timer);
114-
free_qentry(entry);
105+
free(entry);
115106
}
116107

117108
static int objqe_compare(DbRef left, DbRef right, void *arg) {
@@ -431,7 +422,7 @@ static BQUE *setup_que(CommandQueue *queue, DbRef player, DbRef cause,
431422
wakeup_wait_que, tmp);
432423
if (tmp->timer == nullptr) {
433424
free(tmp->text);
434-
free_qentry(tmp);
425+
free(tmp);
435426
return nullptr;
436427
}
437428

src/mux/support/alloc.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ static inline void free_sbuf(void *b) {
2424
free(b);
2525
}
2626

27-
// Defined in command_queue.c, where BQUE is fully declared.
28-
struct bque *alloc_qentry(const char *s);
29-
void free_qentry(struct bque *b);
30-
3127
static inline int safe_str(const char *s, char *b, char **p) {
3228
return safe_copy_str(s, b, p, LBUF_SIZE - 1);
3329
}

0 commit comments

Comments
 (0)