Browse code

misctest: 0-padding for hex print

Daniel-Constantin Mierla authored on 13/09/2021 08:37:33
Showing 1 changed files
... ...
@@ -263,7 +263,7 @@ static int misctest_message_init(void)
263 263
 	char tbuf[BUF_SIZE];
264 264
 	FILE *f;
265 265
 	long fsize;
266
-    sip_msg_t tmsg = { };
266
+	sip_msg_t tmsg = { };
267 267
 
268 268
 	if(misctest_message_data.s!=0 && misctest_message_data.len>0) {
269 269
 		if(misctest_message_data.len>=BUF_SIZE-2) {
... ...
@@ -387,7 +387,7 @@ int misctest_hexprint(void *data, size_t length, int linelen, int split)
387 387
 			}
388 388
 
389 389
 			if (lrem) {
390
-				sprintf(ptr, "%0.2x ", *((unsigned char *) inptr + pos));
390
+				sprintf(ptr, "%02x ", *((unsigned char *) inptr + pos));
391 391
 				lrem--;
392 392
 			} else {
393 393
 				sprintf(ptr, "   ");