mirror of
https://gitlab.kit.edu/kit/scc/sys/mail/exim-encrypt-dlfunc.git
synced 2025-12-06 07:23:56 +01:00
…
diff --git a/src/debug_helpers.c b/src/debug_helpers.c
index a461043..329fd64 100644
--- a/src/debug_helpers.c
+++ b/src/debug_helpers.c
@@ -4,12 +4,12 @@
* Use like this:
* log_write(0, LOG_MAIN, "DEBUG: %s", string2hex(var, var_len));
*/
-char * string2hex(unsigned char * input, size_t length) {
+char *string2hex(unsigned char *input, size_t length) {
const int growth = 3;
- char * outstring = store_get(growth*length+1);
- memset(outstring, 0, 3*length+1);
- for (int i =0; i<length; i++) {
- sprintf(outstring+i*growth, "%02x ", input[i]);
+ char *outstring = store_get(growth * length + 1);
+ memset(outstring, 0, 3 * length + 1);
+ for (int i = 0; i < length; i++) {
+ sprintf(outstring + i * growth, "%02x ", input[i]);
}
return outstring;
}
This commit is contained in:
@ -4,12 +4,12 @@
|
||||
* Use like this:
|
||||
* log_write(0, LOG_MAIN, "DEBUG: %s", string2hex(var, var_len));
|
||||
*/
|
||||
char * string2hex(unsigned char * input, size_t length) {
|
||||
char *string2hex(unsigned char *input, size_t length) {
|
||||
const int growth = 3;
|
||||
char * outstring = store_get(growth*length+1);
|
||||
memset(outstring, 0, 3*length+1);
|
||||
for (int i =0; i<length; i++) {
|
||||
sprintf(outstring+i*growth, "%02x ", input[i]);
|
||||
char *outstring = store_get(growth * length + 1);
|
||||
memset(outstring, 0, 3 * length + 1);
|
||||
for (int i = 0; i < length; i++) {
|
||||
sprintf(outstring + i * growth, "%02x ", input[i]);
|
||||
}
|
||||
return outstring;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user