* \param key_file The file containing the key.
* \param result The key structure is returned here.
*
- * \return The size of the key on success, negative on errors.
+ * \return The size of the key in bytes on success, negative on errors.
*/
int apc_get_pubkey(const char *key_file, struct asymmetric_key **result);
*/
_static_inline_ const char *para_strerror(int num)
{
+ unsigned idx = num & ~((1U << OSL_ERROR_BIT) | (1U << LLS_ERROR_BIT)
+ | (1U << SYSTEM_ERROR_BIT));
assert(num > 0);
if (IS_OSL_ERROR(num)) {
assert(weak_osl_strerror);
- return weak_osl_strerror(num & ~(1U << OSL_ERROR_BIT));
+ return weak_osl_strerror(idx);
}
if (IS_LLS_ERROR(num)) {
assert(weak_lls_strerror);
- return weak_lls_strerror(num & ~(1U << LLS_ERROR_BIT));
+ return weak_lls_strerror(idx);
}
if (IS_SYSTEM_ERROR(num))
- return strerror(num & ~(1U << SYSTEM_ERROR_BIT));
- return para_errlist[num];
+ return strerror(idx);
+ return para_errlist[idx];
}
/**
key->num_bytes = ret;
key->sexp = sexp;
*result = key;
- ret = bits;
+ ret = bits / 8;
release_n:
gcry_mpi_release(n);
release_e:
unsigned int freq;
unsigned int padding;
unsigned int mode;
- unsigned int copyright;
- unsigned int original;
- unsigned int emphasis;
};
static const int frequencies[3][4] = {
+ header->padding;
}
-static int compare_headers(struct mp3header *h1,struct mp3header *h2)
+static int compare_headers(struct mp3header *h1, struct mp3header *h2)
{
if ((*(unsigned int*)h1) == (*(unsigned int*)h2))
return 1;
(h1->layer == h2->layer) &&
(h1->crc == h2->crc) &&
(h1->freq == h2->freq) &&
- (h1->mode == h2->mode) &&
- (h1->copyright == h2->copyright) &&
- (h1->original == h2->original) &&
- (h1->emphasis == h2->emphasis))
+ (h1->mode == h2->mode))
return 1;
return 0;
}