[Olsr-dev] [PATCH v1 21/23] gateway: setup/cleanup multi-gateway mode during startup/shutdown of olsrd

Henning Rogge (spam-protected)
Thu Dec 13 13:01:30 CET 2012

On 12/13/2012 12:34 PM, Ferry Huberts wrote:
>>> +#define SCRIPT_MODE_GENERIC   "generic"
>>> +#define SCRIPT_MODE_OLSRIF    "olsrif"
>>> +#define SCRIPT_MODE_SGWSRVTUN "sgwsrvtun"
>>> +#define SCRIPT_MODE_EGRESSIF  "egressif"
>>> +#define SCRIPT_MODE_SGWTUN    "sgwtun"
>>> +
>>> +#define SCRIPT_ADDMODE(add)   (add ? "add" : "del")
>> This one looks strange too.
>> Can we maybe both inline them? If we really need them, we can convert
>> them into inline functions.
> Can do that, but they're file-private anyway.
> Do you still want them inline?

I know they are only locally used. Still, they make the sourcecode 
harder to read because you have to guess which "constant" is really 
constant and which is a string that can change.

The "constant defines" are fine.

Henning Rogge

Diplom-Informatiker Henning Rogge , Fraunhofer-Institut für
Kommunikation, Informationsverarbeitung und Ergonomie FKIE
Kommunikationssysteme (KOM)
Fraunhofer Straße 20, 53343 Wachtberg, Germany
Telefon +49 228 9435-961,   Fax +49 228 9435 685
mailto:(spam-protected) http://www.fkie.fraunhofer.de

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6169 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20121213/8f1b7289/attachment.bin>

More information about the Olsr-dev mailing list