about summary refs log tree commit diff stats
path: root/src/config/account.c
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2015-05-04 22:29:51 +0100
committerJames Booth <boothj5@gmail.com>2015-05-04 22:29:51 +0100
commit47549452f178a9a81a5481e87d8004ce6010e3c1 (patch)
tree7bf2dc9fb27c51d4e9f35f818d70248df21d6e16 /src/config/account.c
parent4acf853b1c66a9fbc4b80d75144ea7dd01b6471d (diff)
downloadprofani-tty-47549452f178a9a81a5481e87d8004ce6010e3c1.tar.gz
Use null check convention in account.c
Diffstat (limited to 'src/config/account.c')
-rw-r--r--src/config/account.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/config/account.c b/src/config/account.c
index 749eb885..857d049b 100644
--- a/src/config/account.c
+++ b/src/config/account.c
@@ -57,19 +57,19 @@ account_new(const gchar * const name, const gchar * const jid,
 
     new_account->name = strdup(name);
 
-    if (jid != NULL) {
+    if (jid) {
         new_account->jid = strdup(jid);
     } else {
         new_account->jid = strdup(name);
     }
 
-    if (password != NULL) {
+    if (password) {
         new_account->password = strdup(password);
     } else {
         new_account->password = NULL;
     }
 
-    if (eval_password != NULL) {
+    if (eval_password) {
         new_account->eval_password = strdup(eval_password);
     } else {
         new_account->eval_password = NULL;
@@ -77,13 +77,13 @@ account_new(const gchar * const name, const gchar * const jid,
 
     new_account->enabled = enabled;
 
-    if (server != NULL) {
+    if (server) {
         new_account->server = strdup(server);
     } else {
         new_account->server = NULL;
     }
 
-    if (resource != NULL) {
+    if (resource) {
         new_account->resource = strdup(resource);
     } else {
         new_account->resource = NULL;
@@ -134,7 +134,7 @@ account_new(const gchar * const name, const gchar * const jid,
         new_account->muc_nick = strdup(muc_nick);
     }
 
-    if (otr_policy != NULL) {
+    if (otr_policy) {
         new_account->otr_policy = strdup(otr_policy);
     } else {
         new_account->otr_policy = NULL;
@@ -150,7 +150,7 @@ account_new(const gchar * const name, const gchar * const jid,
 char *
 account_create_full_jid(ProfAccount *account)
 {
-    if (account->resource != NULL) {
+    if (account->resource) {
         return create_fulljid(account->jid, account->resource);
     } else {
         return strdup(account->jid);
@@ -198,7 +198,7 @@ account_eval_password(ProfAccount *account)
 void
 account_free(ProfAccount *account)
 {
-    if (account != NULL) {
+    if (account) {
         free(account->name);
         free(account->jid);
         free(account->password);