mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
62c4ec20c7
commit
0a8038dba4
2 changed files with 7 additions and 5 deletions
|
@ -1950,7 +1950,7 @@ static char *cleanedup_nickname(const char *nickname, int len)
|
||||||
return clean;
|
return clean;
|
||||||
}
|
}
|
||||||
|
|
||||||
void replace_nickname_nicknamestring(const char *model, int deviceid, const char *nickname)
|
void replace_nickname_nicknamestring(const char *model, uint32_t deviceid, const char *nickname)
|
||||||
{
|
{
|
||||||
char pattern[160];
|
char pattern[160];
|
||||||
char *entry, *brace, *new_nn;
|
char *entry, *brace, *new_nn;
|
||||||
|
|
|
@ -133,7 +133,7 @@ static void uemis_get_weight(char *buffer, weightsystem_t *weight, int diveid)
|
||||||
weight->description = strdup("unknown");
|
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();
|
struct dive *dive = alloc_dive();
|
||||||
dive->downloaded = TRUE;
|
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
|
* 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
|
* 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. */
|
* 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 *buf = strdup(inbuf);
|
||||||
char *tp, *bp, *tag, *type, *val;
|
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)
|
static char *get_divenr(char *deviceidstr)
|
||||||
{
|
{
|
||||||
int deviceid, i, maxdiveid = 0;
|
uint32_t deviceid, maxdiveid = 0;
|
||||||
|
int i;
|
||||||
char divenr[10];
|
char divenr[10];
|
||||||
|
|
||||||
deviceid = atoi(deviceidstr);
|
deviceid = atoi(deviceidstr);
|
||||||
|
@ -747,7 +748,8 @@ static char *do_uemis_download(struct argument_block *args)
|
||||||
{
|
{
|
||||||
const char *mountpath = args->mountpath;
|
const char *mountpath = args->mountpath;
|
||||||
char *newmax = NULL;
|
char *newmax = NULL;
|
||||||
int start, end, i, deviceidnr;
|
int start, end, i;
|
||||||
|
uint32_t deviceidnr;
|
||||||
char objectid[10];
|
char objectid[10];
|
||||||
char *deviceid = NULL;
|
char *deviceid = NULL;
|
||||||
char *result = NULL;
|
char *result = NULL;
|
||||||
|
|
Loading…
Add table
Reference in a new issue