gtp_error_ind_conf(): fix: guard against an unknown GTP version
This change fixes the following compiler warnings (found by Clang): gtp.c:2747:13: warning: variable 'pdp' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] } else if (version == 1) { gtp.c:2781:14: note: uninitialized use occurs here OSMO_ASSERT(pdp); ^^^ Shall not happen in general, but let's make Clang happy. Change-Id: Id471b22afd4c45435589a4edda0a804e66be3a7a
This commit is contained in:
parent
00a6171b8d
commit
bdf2cf9038
|
@ -2743,6 +2743,9 @@ static int gtp_error_ind_conf(struct gsn_t *gsn, uint8_t version,
|
|||
GTP_LOGPKG(LOGL_ERROR, peer, pack, len, "Unknown PDP context\n");
|
||||
return EOF;
|
||||
}
|
||||
} else {
|
||||
LOGP(DLGTP, LOGL_ERROR, "Unknown version: %d\n", version);
|
||||
return EOF;
|
||||
}
|
||||
|
||||
GTP_LOGPKG(LOGL_ERROR, peer, pack, len,
|
||||
|
|
Loading…
Reference in New Issue