aboutsummaryrefslogtreecommitdiffstats
path: root/src/diag_msg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/diag_msg.c')
-rw-r--r--src/diag_msg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/diag_msg.c b/src/diag_msg.c
index 4d79b7f..1067b03 100644
--- a/src/diag_msg.c
+++ b/src/diag_msg.c
@@ -86,6 +86,7 @@ static void diag_rx_ext_msg_f(struct diag_instance *di, struct msgb *msgb)
struct ext_log_msg *msg;
char *file = NULL, *fmt;
unsigned int num_args;
+ char *cur;
if (len < sizeof(struct ext_log_msg)) {
printf("too short ext_log_msg.\n");
@@ -102,7 +103,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 = strstr(fmt, "%s"); cur && (cur < fmt + strlen(fmt)); cur = strstr(fmt, "%s")) {
+ for (cur = strstr(fmt, "%s"); cur && (cur < fmt + strlen(fmt)); cur = strstr(fmt, "%s")) {
cur[1] = 'p';
}