Skip to content

Commit 54ab6f6

Browse files
committed
use stdlib
1 parent d298d2c commit 54ab6f6

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/c/struct_main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#include <stdbool.h>
22
#include <string.h>
3+
#include <stdlib.h>
34

45
struct params {
56
// order and lengths must match in Fortran and C
@@ -22,6 +23,6 @@ s.Lmy_char = strlen(s.my_char);
2223

2324
struct_check(&s);
2425

25-
return 0;
26+
return EXIT_SUCCESS;
2627

2728
}

src/cxx/struct_main.cxx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include <cstring>
2+
#include <cstdlib>
23

34
struct params {
45
// order and lengths must match in Fortran and C
@@ -10,7 +11,7 @@ struct params {
1011

1112
extern "C" void struct_check(struct params *);
1213

13-
int main(void) {
14+
int main() {
1415

1516
struct params s;
1617

@@ -21,6 +22,6 @@ s.Lmy_char = strlen(s.my_char);
2122

2223
struct_check(&s);
2324

24-
return 0;
25+
return EXIT_SUCCESS;
2526

2627
}

0 commit comments

Comments
 (0)