varnish-cache icon indicating copy to clipboard operation
varnish-cache copied to clipboard

draft: jail_unix: Simplify sub-argument matching

Open dridi opened this issue 1 year ago • 3 comments

TODO: find a name and a home for the ARG_MATCH() macro.

Refs 4001ea251bac6924c2e86bac3d0f2c8d93c96bd8 Refs #4174

dridi avatar Sep 26 '24 14:09 dridi

Needs more work.

I dont like that the strings become unquoted.

Also: strlen() on constant strings is free with all compilers in recent memory.

bsdphk avatar Sep 30 '24 13:09 bsdphk

Requiring an actual quoted string is trivial, but before I proceed, where should this macro live and how should it be named?

dridi avatar Sep 30 '24 13:09 dridi

Flexelint has comments:

--- Module:   mgt/mgt_jail_unix.c (C)
File mgt/mgt_jail_unix.c, Line 120
                            _
#define _MATCH_ARG(arg, name)   \
    Note 9071: defined macro '_MATCH_ARG' is reserved to the compiler

name: I do not have any better idea

place: next to ARGV_ERR ?

nigoroll avatar Sep 30 '24 14:09 nigoroll

replaced by #4272

nigoroll avatar Feb 13 '25 16:02 nigoroll