Skip to content

Commit 96c7986

Browse files
authored
Merge pull request dials#99 from hattne/if-semicolon
Fix potential if-semicolon issue
2 parents 1418376 + adf61af commit 96c7986

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

examples/cbf2adscimg_sub.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ static void puthd (char* field, char* value, char* header)
154154
/*
155155
* find the } marking the end of the information in the header
156156
*/
157-
for ( hp=header; *hp != '}'; hp++);
157+
for ( hp=header; *hp != '}'; hp++)
158+
;
158159

159160
/*
160161
* Write the field name starting at the position of the }
@@ -214,7 +215,8 @@ static void padhd (char* header, int size)
214215
/*
215216
* find the } marking the end of the header
216217
*/
217-
for ( hp=header; *hp != '}'; hp++);
218+
for ( hp=header; *hp != '}'; hp++)
219+
;
218220
hp++;
219221

220222
/*

examples/cbf_testxfelread.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,8 +1030,9 @@ extern "C" {
10301030
for (ii=0; ii < XFEL_DIAMETER; ii++) {
10311031
for (jj=0; jj < XFEL_DIAMETER; jj++) {
10321032
if (outarray[ii][jj] != XFEL_UNDEFINED
1033-
&& outarray[ii][jj] != XFEL_OVERLOAD);
1034-
intoutarray[ii][jj] = (int)(outarray[ii][jj]+0.5);
1033+
&& outarray[ii][jj] != XFEL_OVERLOAD) {
1034+
intoutarray[ii][jj] = (int)(outarray[ii][jj]+0.5);
1035+
}
10351036
}
10361037
}
10371038

src/cbf.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2500,12 +2500,12 @@ int cbf_select_saveframe (cbf_handle handle, unsigned int saveframe)
25002500
return CBF_ARGUMENT;
25012501

25022502

2503-
/* Find the data block node */
2503+
/* Find the data block node */
25042504

2505-
cbf_failnez (cbf_find_parent (&node, handle->node, CBF_DATABLOCK))
2505+
cbf_failnez (cbf_find_parent (&node, handle->node, CBF_DATABLOCK))
25062506

25072507

2508-
/* Select the save frame */
2508+
/* Select the save frame */
25092509

25102510
isf = 0;
25112511

0 commit comments

Comments
 (0)