comparison pwfile.c @ 2:5cd0debdb7d8

Fix a typo potentially causing a NULL pointer dereference
author Guido Berhoerster <guido+pwm@berhoerster.name>
date Sat, 04 Feb 2017 21:04:47 +0100
parents a7e41e1a79c8
children 1cc98a5677d9
comparison
equal deleted inserted replaced
1:55281f14dc9b 2:5cd0debdb7d8
84 84
85 group_field1 = pws3_record_get_field(record1, PWS3_RECORD_FIELD_GROUP); 85 group_field1 = pws3_record_get_field(record1, PWS3_RECORD_FIELD_GROUP);
86 group1 = (group_field1 != NULL) ? pws3_field_get_text(group_field1) : 86 group1 = (group_field1 != NULL) ? pws3_field_get_text(group_field1) :
87 ""; 87 "";
88 group_field2 = pws3_record_get_field(record2, PWS3_RECORD_FIELD_GROUP); 88 group_field2 = pws3_record_get_field(record2, PWS3_RECORD_FIELD_GROUP);
89 group2 = (group_field1 != NULL) ? pws3_field_get_text(group_field2) : 89 group2 = (group_field2 != NULL) ? pws3_field_get_text(group_field2) :
90 ""; 90 "";
91 retval = strcmp(group1, group2); 91 retval = strcmp(group1, group2);
92 if (retval != 0) { 92 if (retval != 0) {
93 return (retval); 93 return (retval);
94 } 94 }