CH_DISPLAY was removed in commit
125a2ff262aa312df20eec68802fd5f8a47f492f, but NUM_CHARSETS was not
updated to match.
By assigning to NUM_CHARSETS the last enumeration value in charset_t, we
guard against its falling out of sync again.
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
#include <talloc.h>
/* this defines the charset types used in samba */
-typedef enum {CH_UTF16LE=0, CH_UTF16=0, CH_UNIX, CH_DOS, CH_UTF8, CH_UTF16BE, CH_UTF16MUNGED} charset_t;
-
-#define NUM_CHARSETS 7
+typedef enum {
+ CH_UTF16LE = 0,
+ CH_UTF16 = 0,
+ CH_UNIX,
+ CH_DOS,
+ CH_UTF8,
+ CH_UTF16BE,
+ CH_UTF16MUNGED,
+ /* The number of distinct character sets. */
+ NUM_CHARSETS
+} charset_t;
/*
* SMB UCS2 (16-bit unicode) internal type.