Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
DanG100 committed Jul 25, 2023
1 parent 25475c6 commit 58bedde
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dataplane/standalone/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ extern "C" {
#include "inc/sai.h"
}

const std::string contextID = "lucius";
const char contextID[] = "lucius";

// SaiObject is an object and its attributes.
class SaiObject {
Expand Down
3 changes: 2 additions & 1 deletion dataplane/standalone/port.cc
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ sai_status_t Port::create(_In_ uint32_t attr_count,
break;
}
}
// Check if the interface exists.
std::string filename("/sys/class/net/" + name);
struct stat buffer;
bool exists = stat(filename.c_str(), &buffer) == 0;
Expand Down Expand Up @@ -177,4 +178,4 @@ std::unordered_map<std::string, std::vector<int>> Port::parseLaneMap() {
std::unordered_map<std::string, std::vector<int>> Port::laneMap =
Port::parseLaneMap();

int Port::nextIdx = 2;
int Port::nextIdx = 2;

0 comments on commit 58bedde

Please sign in to comment.