MT#57423 NULL used in arithmetic (DBRegAgent.cpp)

This commit takes care of this:

     DBRegAgent.cpp: In member function 'bool DBRegAgent::loadRegistrations()':
     DBRegAgent.cpp:293:24: warning: NULL used in arithmetic [-Wpointer-arith]
       293 |       if (object_id == NULL || object_id == 0) {

It makes no sense to compare the `object_id` of type long against
the NULL.

Change-Id: I60cdde2dd459dbfa9c7c942cd8f0d111096411e7
mr11.4.1
Donat Zenichev 3 years ago
parent 1b91d67cdd
commit f0961c7f17

@ -290,8 +290,8 @@ bool DBRegAgent::loadRegistrations() {
string type = TYPE_SUBSCRIBER;
long object_id = row[COLNAME_SUBSCRIBER_ID];
if (object_id == NULL || object_id == 0) {
WARN("REGISTER: object_id is NULL or 0 for this subscriber, skipping..\n");
if (object_id == 0) {
WARN("REGISTER: object_id is 0 for this subscriber, skipping..\n");
continue;
}
@ -415,7 +415,7 @@ bool DBRegAgent::loadRegistrationsPeerings() {
string type = TYPE_PEERING;
long object_id = row[COLNAME_PEER_ID];
if (object_id == NULL || object_id == 0) {
if (object_id == 0) {
WARN("REGISTER: object_id is NULL or 0 for this peering, skipping..\n");
continue;
}

Loading…
Cancel
Save