Correct the order of xCalloc parameters in a couple of places

No functional change.  Thanks to @BenBE for pointing these out.
This commit is contained in:
Nathan Scott 2021-11-05 09:22:09 +11:00
parent 21cb1c4d59
commit e7a8d14cbd
2 changed files with 2 additions and 2 deletions

View File

@ -211,7 +211,7 @@ const ProcessFieldData Process_fields[LAST_PROCESSFIELD] = {
}; };
Process* NetBSDProcess_new(const Settings* settings) { Process* NetBSDProcess_new(const Settings* settings) {
NetBSDProcess* this = xCalloc(sizeof(NetBSDProcess), 1); NetBSDProcess* this = xCalloc(1, sizeof(NetBSDProcess));
Object_setClass(this, Class(NetBSDProcess)); Object_setClass(this, Class(NetBSDProcess));
Process_init(&this->super, settings); Process_init(&this->super, settings);
return &this->super; return &this->super;

View File

@ -203,7 +203,7 @@ const ProcessFieldData Process_fields[LAST_PROCESSFIELD] = {
}; };
Process* OpenBSDProcess_new(const Settings* settings) { Process* OpenBSDProcess_new(const Settings* settings) {
OpenBSDProcess* this = xCalloc(sizeof(OpenBSDProcess), 1); OpenBSDProcess* this = xCalloc(1, sizeof(OpenBSDProcess));
Object_setClass(this, Class(OpenBSDProcess)); Object_setClass(this, Class(OpenBSDProcess));
Process_init(&this->super, settings); Process_init(&this->super, settings);
return &this->super; return &this->super;