diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2020-08-27 16:55:14 +0200 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2020-08-27 16:55:14 +0200 |
commit | 94edc58f97fc772d5aa39dfe787c5b4b67734170 (patch) | |
tree | f95e7011c080391d49bb960c0bd0e7a425292ce8 /libgphoto2_port/libgphoto2_port | |
parent | 6818e136edeefb0dcd73f83838b908e829c74ee9 (diff) | |
download | libgphoto2-94edc58f97fc772d5aa39dfe787c5b4b67734170.tar.gz |
fixup for prev commit ... just make the internal id an int, remove cast again
Diffstat (limited to 'libgphoto2_port/libgphoto2_port')
-rw-r--r-- | libgphoto2_port/libgphoto2_port/gphoto2-port-info-list.c | 2 | ||||
-rw-r--r-- | libgphoto2_port/libgphoto2_port/gphoto2-port-log.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/libgphoto2_port/libgphoto2_port/gphoto2-port-info-list.c b/libgphoto2_port/libgphoto2_port/gphoto2-port-info-list.c index d923734a6..ee65e8e20 100644 --- a/libgphoto2_port/libgphoto2_port/gphoto2-port-info-list.c +++ b/libgphoto2_port/libgphoto2_port/gphoto2-port-info-list.c @@ -465,7 +465,7 @@ gp_port_info_list_get_info (GPPortInfoList *list, int n, GPPortInfo *info) GP_LOG_D ("Getting info of entry %i (%i available)...", n, list->count); - C_PARAMS (n >= 0 && (unsigned int)n < list->count); + C_PARAMS ((n >= 0) && (unsigned int)n < list->count); /* Ignore generic entries */ for (i = 0; i <= n; i++) diff --git a/libgphoto2_port/libgphoto2_port/gphoto2-port-log.c b/libgphoto2_port/libgphoto2_port/gphoto2-port-log.c index 6ed9c8ceb..52a5dd989 100644 --- a/libgphoto2_port/libgphoto2_port/gphoto2-port-log.c +++ b/libgphoto2_port/libgphoto2_port/gphoto2-port-log.c @@ -55,7 +55,7 @@ * Use gp_log_add_func() and gp_log_remove_func() to access it. */ typedef struct { - unsigned int id; /**< Internal id */ + int id; /**< Internal id */ GPLogLevel level; /**< Internal loglevel */ GPLogFunc func; /**< Internal function pointer to call */ void *data; /**< Private data supplied by caller */ @@ -140,7 +140,7 @@ gp_log_remove_func (int id) unsigned int i; for (i=0;i<log_funcs_count;i++) { - if (log_funcs[i].id == (unsigned int)id) { + if (log_funcs[i].id == id) { memmove (log_funcs + i, log_funcs + i + 1, sizeof(LogFunc) * (log_funcs_count - i - 1)); log_funcs_count--; return GP_OK; |