Skip to content

Commit

Permalink
Session fixes (#476)
Browse files Browse the repository at this point in the history
  • Loading branch information
DerjenigeUberMensch authored Nov 21, 2024
1 parent 06e24da commit 410aca7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
8 changes: 4 additions & 4 deletions src/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ __SC__PARSER__SEARCH__INDEX__(
}
else
{
const uint32_t LAST = GArrayEnd(&parser->items);
const uint32_t LAST = parser->items_len;
uint32_t i;
SCItem *item;
for(i = 0; i < LAST; ++i)
Expand Down Expand Up @@ -292,7 +292,7 @@ SCParserSearchSlow(
if(!parser || !NAME)
{ return NULL;
}
const uint32_t LAST = GArrayEnd(&parser->items);
const uint32_t LAST = parser->items_len;
uint32_t i;
SCItem *item;
for(i = 0; i < LAST; ++i)
Expand Down Expand Up @@ -514,7 +514,7 @@ SCParserWrite(
{ return FAILURE;
}

const uint32_t END = GArrayEnd(&parser->items);
const uint32_t END = parser->items_len;
SCItem *item;
uint32_t i;

Expand Down Expand Up @@ -566,7 +566,7 @@ SCParserDestroy(
if(!parser)
{ return;
}
const uint32_t END = GArrayEnd(&parser->items);
const uint32_t END = parser->items_len;
uint32_t i;
SCItem *item;
for(i = 0; i < END; ++i)
Expand Down
8 changes: 0 additions & 8 deletions src/session.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,6 @@ SessionSave(
Debug0("Failed to create session save file.");
return;
}

SCParser parser;

const u32 PARSER_LENGTH = MonLAST + DesktopLAST + ClientLAST;

SCParserCreateFilled(&parser, PARSER_LENGTH);
SessionSaveMonitors(&parser);
SCParserDestroy(&parser);
}


Expand Down

0 comments on commit 410aca7

Please sign in to comment.