X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bcftools%2Fprob1.c;h=e3b0f7344d096f22c37048b2131219378bcb7ba5;hb=032937695157a15fb0ce042deda22afc30be1616;hp=dc4c16ccc7c24edafd39ec0de193eb618435beb8;hpb=a77f3af6a56f643bcf77c52708e6f692af1fe7d3;p=samtools.git diff --git a/bcftools/prob1.c b/bcftools/prob1.c index dc4c16c..e3b0f73 100644 --- a/bcftools/prob1.c +++ b/bcftools/prob1.c @@ -155,8 +155,6 @@ void bcf_p1_destroy(bcf_p1aux_t *ma) } } -#define char2int(s) (((int)s[0])<<8|s[1]) - static int cal_pdg(const bcf1_t *b, bcf_p1aux_t *ma) { int i, j, k; @@ -352,7 +350,7 @@ int bcf_p1_cal(bcf1_t *b, bcf_p1aux_t *ma, bcf_p1rst_t *rst) long double sum = 0.; // set PL and PL_len for (i = 0; i < b->n_gi; ++i) { - if (b->gi[i].fmt == char2int("PL")) { + if (b->gi[i].fmt == bcf_str2int("PL", 2)) { ma->PL = (uint8_t*)b->gi[i].data; ma->PL_len = b->gi[i].len; break;