diag_msg: Don't replace second character of every msg with 'p'
We want to replace all %s with %p, but not modify other parts of the format string...
This commit is contained in:
parent
70ff72d5f4
commit
cf854caa9b
|
@ -102,7 +102,7 @@ static void diag_rx_ext_msg_f(struct diag_instance *di, struct msgb *msgb)
|
|||
file, osmo_load16le(&msg->line_nr));
|
||||
|
||||
/* replace all '%s' with '%p', as %s obviously doesn't work */
|
||||
for (char *cur = fmt; cur && (cur < fmt + strlen(fmt)); cur = strstr(fmt, "%s")) {
|
||||
for (char *cur = strstr(fmt, "%s"); cur && (cur < fmt + strlen(fmt)); cur = strstr(fmt, "%s")) {
|
||||
cur[1] = 'p';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue