Skip to content

Commit 4f57767

Browse files
authored
fix: correct calloc call arguments order (#683)
GCC 14 adds "calloc-transposed-args" warning which is an error at the default IDF build settings.
1 parent 1a05a48 commit 4f57767

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

driver/esp_camera.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ static esp_err_t camera_probe(const camera_config_t *config, camera_model_t *out
153153
return ESP_ERR_INVALID_STATE;
154154
}
155155

156-
s_state = (camera_state_t *) calloc(sizeof(camera_state_t), 1);
156+
s_state = (camera_state_t *) calloc(1, sizeof(camera_state_t));
157157
if (!s_state) {
158158
return ESP_ERR_NO_MEM;
159159
}

0 commit comments

Comments
 (0)