libtommath: mp_error_to_string: return const char* instead of char*
From https://github.com/libtom/libtommath Change-Id: Idd5cbab380f5d504fece93afb3a5fcc026309482
This commit is contained in:
		
				
					committed by
					
						
						Jeffrey Altman
					
				
			
			
				
	
			
			
			
						parent
						
							5bc653f0ef
						
					
				
				
					commit
					7fe018e418
				
			@@ -17,7 +17,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
static const struct {
 | 
					static const struct {
 | 
				
			||||||
     int code;
 | 
					     int code;
 | 
				
			||||||
     char *msg;
 | 
					     const char *msg;
 | 
				
			||||||
} msgs[] = {
 | 
					} msgs[] = {
 | 
				
			||||||
     { MP_OKAY, "Successful" },
 | 
					     { MP_OKAY, "Successful" },
 | 
				
			||||||
     { MP_MEM,  "Out of heap" },
 | 
					     { MP_MEM,  "Out of heap" },
 | 
				
			||||||
@@ -25,7 +25,7 @@ static const struct {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* return a char * string for a given code */
 | 
					/* return a char * string for a given code */
 | 
				
			||||||
char *mp_error_to_string(int code)
 | 
					const char *mp_error_to_string(int code)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
   int x;
 | 
					   int x;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -189,8 +189,8 @@ typedef int ltm_prime_callback(unsigned char *dst, int len, void *dat);
 | 
				
			|||||||
#define DIGIT(m,k) ((m)->dp[(k)])
 | 
					#define DIGIT(m,k) ((m)->dp[(k)])
 | 
				
			||||||
#define SIGN(m)    ((m)->sign)
 | 
					#define SIGN(m)    ((m)->sign)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* error code to char* string */
 | 
					/* error code to const char* string */
 | 
				
			||||||
char *mp_error_to_string(int code);
 | 
					const char *mp_error_to_string(int code);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* ---> init and deinit bignum functions <--- */
 | 
					/* ---> init and deinit bignum functions <--- */
 | 
				
			||||||
/* init a bignum */
 | 
					/* init a bignum */
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user