[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#6402) Mismatched parentheses in LBER_INVALID macro



Full_Name: Julian Foad
Version: CVS head (include/lber.h r1.111)
OS: Linux
URL: ftp://ftp.openldap.org/incoming/julian-foad-091127.patch
Submission from: (NULL) (217.169.20.120)


The definition of the macro LBER_INVALID in 'include/lber.h' has mismatched
(unbalanced) parentheses, meaning that it cannot be used as a valid C expression
by itself.

This error was noticed when parsing the file with 'ctypesgen' as part of
building the ctypes-python bindings of Subversion.

The patch to fix it, in Unidiff format, looks like this:

 #define LBER_INVALID(t)     (((t) & (ber_tag_t) 0x080UL) \
-	&& (((t) & (ber_tag_t) ~ 0x0FF))
+	&& ((t) & (ber_tag_t) ~ 0x0FF))

I uploaded the patch file; URL is filled in below.

The macro is not used within the openldap source, so this problem and this fix
makes no difference to the building and testing of openldap itself.