diff options
| author | Gertjan van den Burg <burg@ese.eur.nl> | 2016-10-06 17:08:57 +0200 |
|---|---|---|
| committer | Gertjan van den Burg <burg@ese.eur.nl> | 2016-10-06 17:08:57 +0200 |
| commit | 5c58431646f05637d801c671a5f55a11903b37a5 (patch) | |
| tree | c4c7f6b2d5b3f9234db580b7d56d8a391d137594 /src/gensvm_strutil.c | |
| parent | Switch to using dsyrk instead of dsyr for speed. (diff) | |
| download | gensvm-5c58431646f05637d801c671a5f55a11903b37a5.tar.gz gensvm-5c58431646f05637d801c671a5f55a11903b37a5.zip | |
Coding style - set all pointers to NULL initially and after free
Diffstat (limited to 'src/gensvm_strutil.c')
| -rw-r--r-- | src/gensvm_strutil.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gensvm_strutil.c b/src/gensvm_strutil.c index 9762e52..a05f320 100644 --- a/src/gensvm_strutil.c +++ b/src/gensvm_strutil.c @@ -75,7 +75,7 @@ char *get_line(FILE *fid, char *filename, char *buffer) * @brief Read a double from file following a format * * @details - * This function reads a double value from a file. If no value can be found, a + * This function reads a double value from a file. If no value can be found, a * warning is printed to stderr, and NAN is returned. * * @param[in] fid File opened for reading @@ -135,7 +135,8 @@ long all_doubles_str(char *buffer, long offset, double *all_doubles) { double value; long i = 0; - char *start, *end; + char *start = NULL, + *end = NULL; start = buffer + offset; while (true) { @@ -170,7 +171,8 @@ long all_longs_str(char *buffer, long offset, long *all_longs) { long value; long i = 0; - char *start, *end; + char *start = NULL, + *end = NULL; start = buffer + offset; while (true) { |
