Skip to content

Commit

Permalink
Fix #32 high RAM/RSS usage
Browse files Browse the repository at this point in the history
No need to initialize global variables, unlike stack variables they are
guaranteed to be initialized to zero, section 3.5.7 of the C89 standard

Signed-off-by: Joachim Wiberg <[email protected]>
  • Loading branch information
troglobit committed Jul 22, 2024
1 parent b2162a7 commit 2fd1916
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/mcjoin.c
Original file line number Diff line number Diff line change
Expand Up @@ -689,9 +689,6 @@ int main(int argc, char *argv[])
int i, c, rc;
size_t ilen;

for (i = 0; i < MAX_NUM_GROUPS; i++)
memset(&groups[i], 0, sizeof(groups[0]));

ident = progname(argv[0]);
while ((c = getopt(argc, argv, "b:c:df:hi:jl:op:st:vw:W:")) != EOF) {
switch (c) {
Expand Down

0 comments on commit 2fd1916

Please sign in to comment.