summaryrefslogtreecommitdiffstats
path: root/gpg-interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'gpg-interface.c')
-rw-r--r--gpg-interface.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/gpg-interface.c b/gpg-interface.c
index 07335987a6..0896458de5 100644
--- a/gpg-interface.c
+++ b/gpg-interface.c
@@ -127,9 +127,7 @@ static struct gpg_format *use_format = &gpg_format[0];
static struct gpg_format *get_format_by_name(const char *str)
{
- int i;
-
- for (i = 0; i < ARRAY_SIZE(gpg_format); i++)
+ for (size_t i = 0; i < ARRAY_SIZE(gpg_format); i++)
if (!strcmp(gpg_format[i].name, str))
return gpg_format + i;
return NULL;
@@ -137,9 +135,9 @@ static struct gpg_format *get_format_by_name(const char *str)
static struct gpg_format *get_format_by_sig(const char *sig)
{
- int i, j;
+ int j;
- for (i = 0; i < ARRAY_SIZE(gpg_format); i++)
+ for (size_t i = 0; i < ARRAY_SIZE(gpg_format); i++)
for (j = 0; gpg_format[i].sigs[j]; j++)
if (starts_with(sig, gpg_format[i].sigs[j]))
return gpg_format + i;
@@ -227,7 +225,7 @@ static void parse_gpg_output(struct signature_check *sigc)
{
const char *buf = sigc->gpg_status;
const char *line, *next;
- int i, j;
+ int j;
int seen_exclusive_status = 0;
/* Iterate over all lines */
@@ -242,7 +240,7 @@ static void parse_gpg_output(struct signature_check *sigc)
continue;
/* Iterate over all search strings */
- for (i = 0; i < ARRAY_SIZE(sigcheck_gpg_status); i++) {
+ for (size_t i = 0; i < ARRAY_SIZE(sigcheck_gpg_status); i++) {
if (skip_prefix(line, sigcheck_gpg_status[i].check, &line)) {
/*
* GOODSIG, BADSIG etc. can occur only once for
@@ -699,7 +697,7 @@ size_t parse_signed_buffer(const char *buf, size_t size)
match = len;
eol = memchr(buf + len, '\n', size - len);
- len += eol ? eol - (buf + len) + 1 : size - len;
+ len += eol ? (size_t) (eol - (buf + len) + 1) : size - len;
}
return match;
}