]> git.cworth.org Git - notmuch/commitdiff
cli: remove enum names from typedefs
authorJani Nikula <jani@nikula.org>
Wed, 13 Oct 2021 14:02:17 +0000 (17:02 +0300)
committerDavid Bremner <david@tethera.net>
Sat, 23 Oct 2021 11:39:16 +0000 (08:39 -0300)
There are some enum typedefs with the enum name:

    typedef enum _name_t { ... } name_t;

We don't need or use the enum names _name_t for anything, and not all
of the enum typedefs have them. We have the typedefs specifically to
use the typedef name.

Use the anonymous enum in the typedefs:

    typedef enum { ... } name_t;

notmuch-client.h
util/hex-escape.h

index 96d81166d2f52342b721f7be293eb2641ea4e868..82ae44e429fc167524177ab6ed970ea336d2ca0f 100644 (file)
@@ -426,13 +426,13 @@ mime_node_seek_dfs (mime_node_t *node, int n);
 const _notmuch_message_crypto_t *
 mime_node_get_message_crypto_status (mime_node_t *node);
 
-typedef enum dump_formats {
+typedef enum {
     DUMP_FORMAT_AUTO,
     DUMP_FORMAT_BATCH_TAG,
     DUMP_FORMAT_SUP
 } dump_format_t;
 
-typedef enum dump_includes {
+typedef enum {
     DUMP_INCLUDE_TAGS          = 1,
     DUMP_INCLUDE_CONFIG                = 2,
     DUMP_INCLUDE_PROPERTIES    = 4
index 8703334cda8d4836660bed1f8cf41c65e2fec023..83a4c6f146fe15387b0ef8c151ae6e5b4dcbc766 100644 (file)
@@ -5,7 +5,7 @@
 extern "C" {
 #endif
 
-typedef enum hex_status {
+typedef enum {
     HEX_SUCCESS = 0,
     HEX_SYNTAX_ERROR,
     HEX_OUT_OF_MEMORY