detect/app-layer-protocol: fix compile warning

detect-app-layer-protocol.c:160:11: error: initializing 'char *' with an expression of type 'const char *' discards qualifiers
      [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
  160 |     char *sep = strchr(arg, ',');
      |           ^     ~~~~~~~~~~~~~~~~
1 error generated.

(cherry picked from commit 3564f2f928)
pull/15343/head
Victor Julien 2 months ago
parent b08996771e
commit 16d227b620

@ -157,7 +157,7 @@ static DetectAppLayerProtocolData *DetectAppLayerProtocolParse(const char *arg,
AppProto alproto = ALPROTO_UNKNOWN;
char alproto_copy[MAX_ALPROTO_NAME];
char *sep = strchr(arg, ',');
const char *sep = strchr(arg, ',');
char *alproto_name;
if (sep && sep - arg < MAX_ALPROTO_NAME) {
strlcpy(alproto_copy, arg, sep - arg + 1);

Loading…
Cancel
Save