libpurple/protocols/novell/nmuserrecord.c

changeset 39913
ce96d4639dc7
parent 37425
5061721fd98f
child 40765
a5381c20e802
--- a/libpurple/protocols/novell/nmuserrecord.c	Wed Oct 02 03:43:56 2019 -0400
+++ b/libpurple/protocols/novell/nmuserrecord.c	Wed Oct 02 06:21:41 2019 -0400
@@ -81,12 +81,8 @@
 		 * just pick the first value and return it
 		 */
 		NMField *tmp = (NMField *)field->ptr_value;
-		if ((tmp != NULL) &&
-			((tmp->type == NMFIELD_TYPE_UTF8) ||
-			(tmp->type == NMFIELD_TYPE_DN))) {
-
+		if (tmp->type == NMFIELD_TYPE_UTF8 || tmp->type == NMFIELD_TYPE_DN) {
 			value = (char *)tmp->ptr_value;
-
 		} else {
 			return NULL;
 		}
@@ -474,14 +470,12 @@
 			int max = nm_count_fields(fields);
 
 			if (index < max) {
-				if (user_record) {
 					field = &fields[index];
 					if (field && field->tag && field->ptr_value) {
 						property = g_new0(NMProperty, 1);
 						property->tag = g_strdup(field->tag);
 						property->value = _get_attribute_value(field);
 					}
-				}
 			}
 		}
 	}

mercurial