mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
improve const correctness
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
This commit is contained in:
parent
e886ba0c6f
commit
1a85448bf2
@ -120,11 +120,11 @@ chat_session_get_jid(const char* const barejid)
|
||||
return jid;
|
||||
}
|
||||
|
||||
char*
|
||||
const char*
|
||||
chat_session_get_state(const char* const barejid)
|
||||
{
|
||||
ChatSession* session = chat_session_get(barejid);
|
||||
char* state = NULL;
|
||||
const char* state = NULL;
|
||||
if (session) {
|
||||
if (prefs_get_boolean(PREF_STATES) && session->send_states) {
|
||||
state = STANZA_NAME_ACTIVE;
|
||||
|
@ -59,7 +59,7 @@ void chat_session_recipient_paused(const char* const barejid, const char* const
|
||||
void chat_session_recipient_gone(const char* const barejid, const char* const resource);
|
||||
void chat_session_recipient_inactive(const char* const barejid, const char* const resource);
|
||||
char* chat_session_get_jid(const char* const barejid);
|
||||
char* chat_session_get_state(const char* const barejid);
|
||||
const char* chat_session_get_state(const char* const barejid);
|
||||
|
||||
void chat_session_remove(const char* const barejid);
|
||||
|
||||
|
@ -424,7 +424,7 @@ message_send_chat(const char* const barejid, const char* const msg, const char*
|
||||
{
|
||||
xmpp_ctx_t* const ctx = connection_get_ctx();
|
||||
|
||||
char* state = chat_session_get_state(barejid);
|
||||
const char* state = chat_session_get_state(barejid);
|
||||
char* jid = chat_session_get_jid(barejid);
|
||||
char* id = connection_create_stanza_id();
|
||||
|
||||
@ -459,7 +459,7 @@ message_send_chat_pgp(const char* const barejid, const char* const msg, gboolean
|
||||
{
|
||||
xmpp_ctx_t* const ctx = connection_get_ctx();
|
||||
|
||||
char* state = chat_session_get_state(barejid);
|
||||
const char* state = chat_session_get_state(barejid);
|
||||
char* jid = chat_session_get_jid(barejid);
|
||||
char* id = connection_create_stanza_id();
|
||||
|
||||
@ -525,7 +525,7 @@ message_send_chat_ox(const char* const barejid, const char* const msg, gboolean
|
||||
#ifdef HAVE_LIBGPGME
|
||||
xmpp_ctx_t* const ctx = connection_get_ctx();
|
||||
|
||||
char* state = chat_session_get_state(barejid);
|
||||
const char* state = chat_session_get_state(barejid);
|
||||
char* jid = chat_session_get_jid(barejid);
|
||||
char* id = connection_create_stanza_id();
|
||||
|
||||
@ -589,7 +589,7 @@ message_send_chat_otr(const char* const barejid, const char* const msg, gboolean
|
||||
{
|
||||
xmpp_ctx_t* const ctx = connection_get_ctx();
|
||||
|
||||
char* state = chat_session_get_state(barejid);
|
||||
const char* state = chat_session_get_state(barejid);
|
||||
char* jid = chat_session_get_jid(barejid);
|
||||
char* id = connection_create_stanza_id();
|
||||
|
||||
@ -627,7 +627,7 @@ message_send_chat_omemo(const char* const jid, uint32_t sid, GList* keys,
|
||||
const unsigned char* const ciphertext, size_t ciphertext_len,
|
||||
gboolean request_receipt, gboolean muc, const char* const replace_id)
|
||||
{
|
||||
char* state = chat_session_get_state(jid);
|
||||
const char* state = chat_session_get_state(jid);
|
||||
xmpp_ctx_t* const ctx = connection_get_ctx();
|
||||
char* id;
|
||||
xmpp_stanza_t* message;
|
||||
|
Loading…
Reference in New Issue
Block a user