about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-07-02 15:20:17 +0200
committerMichael Vetter <jubalh@iodoru.org>2020-07-02 15:20:17 +0200
commit10190b5fb0ff76694d5a6380388244de07a6df1e (patch)
tree37db9bb7393b8d32a09a51d4ae628c98a63a66e4 /src
parent26d4b00d6d3bce10296622059429684c6a68f3e4 (diff)
downloadprofani-tty-10190b5fb0ff76694d5a6380388244de07a6df1e.tar.gz
message.c: Adjust function formatting
Diffstat (limited to 'src')
-rw-r--r--src/xmpp/message.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/xmpp/message.c b/src/xmpp/message.c
index 74b6d2ea..2034d61e 100644
--- a/src/xmpp/message.c
+++ b/src/xmpp/message.c
@@ -1377,7 +1377,9 @@ _handle_chat(xmpp_stanza_t *const stanza, gboolean is_mam)
  *
  *
  */
-static void _handle_ox_chat(xmpp_stanza_t *const stanza, ProfMessage *message, gboolean is_mam) {
+static void
+_handle_ox_chat(xmpp_stanza_t *const stanza, ProfMessage *message, gboolean is_mam)
+{
 #ifdef HAVE_LIBGPGME
 	xmpp_stanza_t *ox = stanza_get_child_by_name_and_ns(stanza, "openpgp", STANZA_NS_OPENPGP_0);
 	message->plain = p_ox_gpg_decrypt(xmpp_stanza_get_text(ox));
@@ -1485,16 +1487,18 @@ message_is_sent_by_us(const ProfMessage *const message, bool checkOID) {
 }
 
 #ifdef HAVE_LIBGPGME
-xmpp_stanza_t* _openpgp_signcrypt(xmpp_ctx_t* ctx, const char* const to, const char* const text) {
-
-  time_t now = time(NULL);
-  struct tm* tm = localtime(&now);
-  char buf[255];
-  strftime(buf, sizeof(buf), "%FT%T%z", tm);
+xmpp_stanza_t*
+_openpgp_signcrypt(xmpp_ctx_t* ctx, const char* const to, const char* const text)
+{
+    time_t now = time(NULL);
+    struct tm* tm = localtime(&now);
+    char buf[255];
+    strftime(buf, sizeof(buf), "%FT%T%z", tm);
     int randnr = rand() % 5;
     char rpad_data[randnr];
+
     for(int i = 0; i < randnr-1; i++) {
-      rpad_data[i] = 'c';
+        rpad_data[i] = 'c';
     }
     rpad_data[randnr-1] = '\0';