diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-03-09 21:12:13 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-03-09 21:25:20 -0700 |
commit | b1d1c8882207049af73f4dc4bc8ef071c97c881a (patch) | |
tree | 2f0ca3f74a60bc205b870ac95156f9806bd4c603 /load-git.c | |
parent | 7f32f930ef850f789ecd0a3d3679aeec4dddd215 (diff) | |
download | subsurface-b1d1c8882207049af73f4dc4bc8ef071c97c881a.tar.gz |
Fix uninitialized variable
s could be used without being set.
Also convert the file to utf-8 - for some reason it was created as
iso8859.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'load-git.c')
-rw-r--r-- | load-git.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/load-git.c b/load-git.c index 92f8dbc05..ad4a03294 100644 --- a/load-git.c +++ b/load-git.c @@ -401,7 +401,7 @@ static char *parse_sample_unit(struct sample *sample, double val, char *unit) end++; } - /* The units are "°C", "m" or "bar", so let's just look at the first character */ + /* The units are "°C", "m" or "bar", so let's just look at the first character */ switch (*unit) { case 'm': sample->depth.mm = rint(1000*val); @@ -440,7 +440,7 @@ static struct sample *new_sample(struct divecomputer *dc) static void sample_parser(char *line, struct divecomputer *dc) { - int m,s; + int m, s = 0; struct sample *sample = new_sample(dc); m = strtol(line, &line, 10); @@ -530,7 +530,7 @@ static void parse_event_keyvalue(void *_event, const char *key, const char *valu static void parse_dc_event(char *line, struct membuffer *str, void *_dc) { - int m, s; + int m, s = 0; const char *name; struct divecomputer *dc = _dc; struct event event = { 0 }; |