Skip to content

Commit

Permalink
Fix calloc argument order
Browse files Browse the repository at this point in the history
  • Loading branch information
knro committed May 26, 2024
1 parent c8037fe commit 46738e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion indi-gphoto/gphoto_ccd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1505,7 +1505,7 @@ bool GPhotoCCD::grabImage()
ISwitch * GPhotoCCD::create_switch(const char * basestr, char ** options, int max_opts, int setidx)
{
int i;
ISwitch * sw = static_cast<ISwitch *>(calloc(sizeof(ISwitch), max_opts));
ISwitch * sw = static_cast<ISwitch *>(calloc(max_opts, sizeof(ISwitch)));
ISwitch * one_sw = sw;

char sw_name[MAXINDINAME];
Expand Down

0 comments on commit 46738e9

Please sign in to comment.