Skip to content

Commit

Permalink
Replace memset with initialization at declaration for struct in_file
Browse files Browse the repository at this point in the history
  • Loading branch information
Shubham Vasudeo Desai committed Jun 17, 2024
1 parent 581c84d commit 2e4dbfa
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions display/d.linegraph/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,9 @@ int main(int argc, char **argv)
FILE *fp; /* pointer to file */
};

struct in_file in[12];
struct in_file in[12] = {0};
struct GModule *module;

// Initialize the 'in' array to zero
memset(in, 0, sizeof(in));
float max_y;
float min_y;
float height, width;
Expand Down

0 comments on commit 2e4dbfa

Please sign in to comment.