Skip to content

Commit

Permalink
Initialize fields of devnode, and make != operator const.
Browse files Browse the repository at this point in the history
  • Loading branch information
peadar committed Oct 6, 2023
1 parent b36ad79 commit 00b69a4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libpstack/proc.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,11 @@ struct Lwp {
struct PrintableFrame;

struct DevNode {
int major;
int minor;
unsigned long inode;
int major = -1;
int minor = -1;
unsigned long inode = -1;
std::string path;
bool operator == (const DevNode &rhs) {
bool operator == (const DevNode &rhs) const {
return major == rhs.major && minor == rhs.minor && inode == rhs.inode;
}
};
Expand Down

0 comments on commit 00b69a4

Please sign in to comment.