WHEN either uid is NULL or uid_length is not equal to UID_LENGTH AND uid is
not NULL, uid_length must to be NOT equal to UID_LENGTH, so additional
conditional in if statement is not necessary. It will be always true. It is
only harder to analyze function code.
uid = near_tag_get_nfcid(adapter_idx, target_idx, &uid_length);
if (uid == NULL || uid_length != UID_LENGTH) {
- if (uid != NULL && uid_length != UID_LENGTH) {
+ if (uid != NULL) {
near_error("Invalid UID");
g_free(uid);