Bugfix: Correct signed/unsigned warnings
This commit is contained in:
@@ -36,14 +36,14 @@ static const char *capnames[] = {
|
||||
};
|
||||
|
||||
const char *blktmpl_capabilityname(gbt_capabilities_t caps) {
|
||||
for (int i = 0; i < sizeof(capnames); ++i)
|
||||
for (unsigned int i = 0; i < sizeof(capnames); ++i)
|
||||
if (caps & (1 << i))
|
||||
return capnames[i];
|
||||
return NULL;
|
||||
}
|
||||
|
||||
gbt_capabilities_t blktmpl_getcapability(const char *n) {
|
||||
for (int i = 0; i < sizeof(capnames); ++i)
|
||||
for (unsigned int i = 0; i < sizeof(capnames); ++i)
|
||||
if (capnames[i] && !strcasecmp(n, capnames[i]))
|
||||
return 1 << i;
|
||||
return 0;
|
||||
@@ -90,7 +90,7 @@ void blktxn_free(struct blktxn_t *bt) {
|
||||
}
|
||||
|
||||
void blktmpl_free(blktemplate_t *tmpl) {
|
||||
for (int i = 0; i < tmpl->txncount; ++i)
|
||||
for (unsigned long i = 0; i < tmpl->txncount; ++i)
|
||||
blktxn_free(&tmpl->txns[i]);
|
||||
free(tmpl->txns);
|
||||
if (tmpl->cbtxn)
|
||||
|
||||
Reference in New Issue
Block a user