Skip to content

Commit

Permalink
Defined frontend graph type length as a constant
Browse files Browse the repository at this point in the history
  • Loading branch information
thevindu-w committed Jul 28, 2023
1 parent d14be5b commit 389fdff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/frontend/JasmineGraphFrontEnd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -504,9 +504,9 @@ void *frontendservicesesion(std::string masterIP, int connFd, SQLiteDBInterface
continue;
}

char type[21];
bzero(type, 21);
read(connFd, type, 20);
char type[FRONTEND_GRAPH_TYPE_LENGTH + 1];
bzero(type, FRONTEND_GRAPH_TYPE_LENGTH + 1);
read(connFd, type, FRONTEND_GRAPH_TYPE_LENGTH);
string graphType(type);
graphType = utils.trim_copy(graphType, " \f\n\r\t\v");

Expand Down
1 change: 1 addition & 0 deletions src/frontend/JasmineGraphFrontEndProtocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class JasminGraphFrontEndProtocol {

const int FRONTEND_COMMAND_LENGTH = 4;
const int FRONTEND_DATA_LENGTH = 300;
const int FRONTEND_GRAPH_TYPE_LENGTH = 20;

const double PAGE_RANK_ALPHA = 0.85;
const int PAGE_RANK_ITERATIONS = 10;
Expand Down

0 comments on commit 389fdff

Please sign in to comment.