Skip to content

Commit

Permalink
Corrected malloc size (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zwixx authored Jan 19, 2024
1 parent 38c6fbd commit 6962411
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion KD100.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const int pid = 0x006d;
void GetDevice(int debug, int accept, int dry){
int err=0, wheelFunction=0, button=-1, totalButtons=0, wheelType=0, leftWheels=0, rightWheels=0, totalWheels=0;
char* data = malloc(512*sizeof(char)); // Data received from the config file and the USB
event* events = malloc(1*sizeof(*events)); // Stores key events and functions
event* events = malloc(1*sizeof(event)); // Stores key events and functions
wheel* wheelEvents = malloc(1*sizeof(wheel)); // Stores wheel functions
event prevEvent;
uid_t uid=getuid(); // Used to check if the driver was ran as root
Expand Down

0 comments on commit 6962411

Please sign in to comment.