literal with suffix
This commit is contained in:
		
							parent
							
								
									82cd2c7f37
								
							
						
					
					
						commit
						519a1de8da
					
				@ -17,7 +17,7 @@
 | 
				
			|||||||
int mp_complement(const mp_int *a, mp_int *b)
 | 
					int mp_complement(const mp_int *a, mp_int *b)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
   int res = mp_neg(a, b);
 | 
					   int res = mp_neg(a, b);
 | 
				
			||||||
   return res == MP_OKAY ? mp_sub_d(b, 1, b) : res;
 | 
					   return res == MP_OKAY ? mp_sub_d(b, 1uL, b) : res;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -22,7 +22,7 @@ int mp_tc_and(const mp_int *a, const mp_int *b, mp_int *c)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
   if (as || bs) {
 | 
					   if (as || bs) {
 | 
				
			||||||
      bits = MAX(mp_count_bits(a), mp_count_bits(b));
 | 
					      bits = MAX(mp_count_bits(a), mp_count_bits(b));
 | 
				
			||||||
      res = mp_init_set_int(&_mx, 1);
 | 
					      res = mp_init_set_int(&_mx, 1uL);
 | 
				
			||||||
      if (res != MP_OKAY) {
 | 
					      if (res != MP_OKAY) {
 | 
				
			||||||
         goto end;
 | 
					         goto end;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
				
			|||||||
@ -21,13 +21,13 @@ int mp_tc_div_2d(const mp_int *a, int b, mp_int *c)
 | 
				
			|||||||
    return mp_div_2d(a, b, c, NULL);
 | 
					    return mp_div_2d(a, b, c, NULL);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  res = mp_add_d(a, 1, c);
 | 
					  res = mp_add_d(a, 1uL, c);
 | 
				
			||||||
  if (res != MP_OKAY) {
 | 
					  if (res != MP_OKAY) {
 | 
				
			||||||
    return res;
 | 
					    return res;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  res = mp_div_2d(c, b, c, NULL);
 | 
					  res = mp_div_2d(c, b, c, NULL);
 | 
				
			||||||
  return res == MP_OKAY ? mp_sub_d(c, 1, c) : res;
 | 
					  return res == MP_OKAY ? mp_sub_d(c, 1uL, c) : res;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -22,7 +22,7 @@ int mp_tc_or(const mp_int *a, const mp_int *b, mp_int *c)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
   if (as || bs) {
 | 
					   if (as || bs) {
 | 
				
			||||||
      bits = MAX(mp_count_bits(a), mp_count_bits(b));
 | 
					      bits = MAX(mp_count_bits(a), mp_count_bits(b));
 | 
				
			||||||
      res = mp_init_set_int(&_mx, 1);
 | 
					      res = mp_init_set_int(&_mx, 1uL);
 | 
				
			||||||
      if (res != MP_OKAY) {
 | 
					      if (res != MP_OKAY) {
 | 
				
			||||||
         goto end;
 | 
					         goto end;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
				
			|||||||
@ -22,7 +22,7 @@ int mp_tc_xor(const mp_int *a, const mp_int *b, mp_int *c)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
   if (as || bs) {
 | 
					   if (as || bs) {
 | 
				
			||||||
      bits = MAX(mp_count_bits(a), mp_count_bits(b));
 | 
					      bits = MAX(mp_count_bits(a), mp_count_bits(b));
 | 
				
			||||||
      res = mp_init_set_int(&_mx, 1);
 | 
					      res = mp_init_set_int(&_mx, 1uL);
 | 
				
			||||||
      if (res != MP_OKAY) {
 | 
					      if (res != MP_OKAY) {
 | 
				
			||||||
         goto end;
 | 
					         goto end;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user