diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-01-18 12:56:54 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-01-18 12:58:45 -0800 |
commit | 0a8038dba48ffbde57292436fae54640a50347dc (patch) | |
tree | b37b78680f8f24abeb479cf7bc29021d3d592593 /uemis-downloader.c | |
parent | 62c4ec20c7c8395eb2d22011520b6fadc03a87a2 (diff) | |
download | subsurface-0a8038dba48ffbde57292436fae54640a50347dc.tar.gz |
Consistently use uint32_t for deviceid
There were a handful of places that incorrectly used signed values for the
deviceid.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'uemis-downloader.c')
-rw-r--r-- | uemis-downloader.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/uemis-downloader.c b/uemis-downloader.c index 1c7b23887..22d3bdc7d 100644 --- a/uemis-downloader.c +++ b/uemis-downloader.c @@ -133,7 +133,7 @@ static void uemis_get_weight(char *buffer, weightsystem_t *weight, int diveid) weight->description = strdup("unknown"); } -static struct dive *uemis_start_dive(int deviceid) +static struct dive *uemis_start_dive(uint32_t deviceid) { struct dive *dive = alloc_dive(); dive->downloaded = TRUE; @@ -628,7 +628,7 @@ static void parse_tag(struct dive *dive, char *tag, char *val) * index into yet another data store that we read out later. In order to * correctly populate the location and gps data from that we need to remember * the adresses of those fields for every dive that references the divespot. */ -static void process_raw_buffer(int deviceid, char *inbuf, char **max_divenr, gboolean keep_number) +static void process_raw_buffer(uint32_t deviceid, char *inbuf, char **max_divenr, gboolean keep_number) { char *buf = strdup(inbuf); char *tp, *bp, *tag, *type, *val; @@ -726,7 +726,8 @@ static void process_raw_buffer(int deviceid, char *inbuf, char **max_divenr, gbo static char *get_divenr(char *deviceidstr) { - int deviceid, i, maxdiveid = 0; + uint32_t deviceid, maxdiveid = 0; + int i; char divenr[10]; deviceid = atoi(deviceidstr); @@ -747,7 +748,8 @@ static char *do_uemis_download(struct argument_block *args) { const char *mountpath = args->mountpath; char *newmax = NULL; - int start, end, i, deviceidnr; + int start, end, i; + uint32_t deviceidnr; char objectid[10]; char *deviceid = NULL; char *result = NULL; |