Skip to content

Commit

Permalink
fix uninitialized data usage
Browse files Browse the repository at this point in the history
  • Loading branch information
kseniyazaytseva committed Feb 9, 2024
1 parent c6f30fd commit 7e9b1c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions interface/zrotg.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ void CNAME(void *VDA, void *VDB, FLOAT *C, void *VS) {
if (ada >= h *safmin) {
*C = sqrt(ada/h);
*R = *DA / *C;
*(R+1) = *(DA+1) / *(C+1);
*(R+1) = *(DA+1) / *C;
rtmax *= 2.;
if ( ada > rtmin && h < rtmax) { // no risk of intermediate overflow
*S = *S1 * (*DA / adahsq) - *(S1+1)* (*(DA+1)/adahsq);
Expand All @@ -115,7 +115,7 @@ void CNAME(void *VDA, void *VDB, FLOAT *C, void *VS) {
*C = ada / adahsq;
if (*C >= safmin) {
*R = *DA / *C;
*(R+1) = *(DA+1) / *(C+1);
*(R+1) = *(DA+1) / *C;
} else {
*R = *DA * (h / adahsq);
*(R+1) = *(DA+1) * (h / adahsq);
Expand Down

0 comments on commit 7e9b1c0

Please sign in to comment.