T2345: After examining comments changed by batch conversion of NULL
to nullptr, I've corrected a small number where it seemed clear that the previous NULL should have been either "NULL" (where the code is looking for a string with that value), or null char / null byte (where the comment is talking about the char/byte that terminates a c-style string). Also changed 6 places where the batch change had changed 'NULL ptr' to 'nullptr ptr'. Now they simply say 'nullptr'.
This commit is contained in:
@ -713,7 +713,7 @@ void ReadDump::read_atoms()
|
||||
|
||||
if (nnew > maxnew || maxnew == 0) {
|
||||
memory->destroy(fields);
|
||||
maxnew = MAX(nnew,1); // avoid nullptr ptr
|
||||
maxnew = MAX(nnew,1); // avoid nullptr
|
||||
memory->create(fields,maxnew,nfield,"read_dump:fields");
|
||||
}
|
||||
|
||||
@ -753,7 +753,7 @@ void ReadDump::read_atoms()
|
||||
nnew = static_cast<int> (olast - ofirst);
|
||||
if (nnew > maxnew || maxnew == 0) {
|
||||
memory->destroy(fields);
|
||||
maxnew = MAX(nnew,1); // avoid nullptr ptr
|
||||
maxnew = MAX(nnew,1); // avoid nullptr
|
||||
memory->create(fields,maxnew,nfield,"read_dump:fields");
|
||||
}
|
||||
|
||||
@ -779,7 +779,7 @@ void ReadDump::read_atoms()
|
||||
nnew = static_cast<int> (sum);
|
||||
if (nnew > maxnew || maxnew == 0) {
|
||||
memory->destroy(fields);
|
||||
maxnew = MAX(nnew,1); // avoid nullptr ptr
|
||||
maxnew = MAX(nnew,1); // avoid nullptr
|
||||
memory->create(fields,maxnew,nfield,"read_dump:fields");
|
||||
}
|
||||
|
||||
@ -1105,7 +1105,7 @@ void ReadDump::migrate_new_atoms()
|
||||
Irregular *irregular = new Irregular(lmp);
|
||||
int nrecv = irregular->create_data(nnew,procassign,1);
|
||||
int newmaxnew = MAX(nrecv,maxnew);
|
||||
newmaxnew = MAX(newmaxnew,1); // avoid nullptr ptr
|
||||
newmaxnew = MAX(newmaxnew,1); // avoid nullptr
|
||||
memory->create(newfields,newmaxnew,nfield,"read_dump:newfields");
|
||||
irregular->exchange_data((char *) &fields[0][0],nfield*sizeof(double),
|
||||
(char *) &newfields[0][0]);
|
||||
|
||||
Reference in New Issue
Block a user