mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-18 23:16:22 +00:00
Some minor changes
* Fix some linter suggestions. * Change some defines to `const` vars. * Free buffer entries in the reverse order they were allocated. Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
This commit is contained in:
@@ -213,12 +213,12 @@ _create_entry(const char* show_char, int pad_indent, GDateTime* time, int flags,
|
|||||||
static void
|
static void
|
||||||
_free_entry(ProfBuffEntry* entry)
|
_free_entry(ProfBuffEntry* entry)
|
||||||
{
|
{
|
||||||
free(entry->show_char);
|
|
||||||
free(entry->message);
|
|
||||||
free(entry->display_from);
|
|
||||||
free(entry->from_jid);
|
|
||||||
free(entry->id);
|
free(entry->id);
|
||||||
free(entry->receipt);
|
free(entry->message);
|
||||||
|
free(entry->from_jid);
|
||||||
|
free(entry->display_from);
|
||||||
g_date_time_unref(entry->time);
|
g_date_time_unref(entry->time);
|
||||||
|
free(entry->show_char);
|
||||||
|
free(entry->receipt);
|
||||||
free(entry);
|
free(entry);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,13 +61,11 @@
|
|||||||
#include "ui/screen.h"
|
#include "ui/screen.h"
|
||||||
#include "xmpp/xmpp.h"
|
#include "xmpp/xmpp.h"
|
||||||
#include "xmpp/roster_list.h"
|
#include "xmpp/roster_list.h"
|
||||||
#include "xmpp/connection.h"
|
|
||||||
#include "database.h"
|
|
||||||
|
|
||||||
#define PAD_SIZE 1000
|
static const int PAD_SIZE = 100;
|
||||||
#define LOADING_MESSAGE "Loading older messages…"
|
static const char* LOADING_MESSAGE = "Loading older messages…";
|
||||||
#define CONS_WIN_TITLE "Profanity. Type /help for help information."
|
static const char* CONS_WIN_TITLE = "Profanity. Type /help for help information.";
|
||||||
#define XML_WIN_TITLE "XML Console"
|
static const char* XML_WIN_TITLE = "XML Console";
|
||||||
|
|
||||||
#define CEILING(X) (X - (int)(X) > 0 ? (int)(X + 1) : (int)(X))
|
#define CEILING(X) (X - (int)(X) > 0 ? (int)(X + 1) : (int)(X))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user