(The changes in this patch are simple, but likely more controversial than
the rest.)

The following four components don't play nice together:

- Needlessly spelling out "extern" for function declarations in header
  files. (C99 6.2.2p5: "If the declaration of an identifier for a function
  has no storage-class specifier, its linkage is determined exactly as if
  it were declared with the storage-class specifier extern [...]".)

- Long return type names.

- Very long function names, such as "nbd_internal" +
  ("crypto_create_session" or "state_group_parent").

- Not placing function names seen in declarators (as opposed to those seen
  in definitions) at column #0, lest we confuse utilities that scan for
  "tags".

Shorten lines by breaking the function names to new lines as well, but
indent them to column #2.

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2172516
Signed-off-by: Laszlo Ersek <ler...@redhat.com>
---
 lib/internal.h | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/internal.h b/lib/internal.h
index 2de8e4e5e043..b155681d057f 100644
--- a/lib/internal.h
+++ b/lib/internal.h
@@ -407,7 +407,9 @@ extern int nbd_internal_wait_until_connected (struct 
nbd_handle *h)
   LIBNBD_ATTRIBUTE_NONNULL (1);
 
 /* crypto.c */
-extern struct socket *nbd_internal_crypto_create_session (struct nbd_handle *, 
struct socket *oldsock)
+extern struct socket *
+  nbd_internal_crypto_create_session (struct nbd_handle *,
+                                      struct socket *oldsock)
   LIBNBD_ATTRIBUTE_NONNULL (1, 2);
 extern bool nbd_internal_crypto_is_reading (struct nbd_handle *)
   LIBNBD_ATTRIBUTE_NONNULL (1);
@@ -504,7 +506,8 @@ extern int nbd_internal_run (struct nbd_handle *h, enum 
external_event ev)
   LIBNBD_ATTRIBUTE_NONNULL (1);
 extern const char *nbd_internal_state_short_string (enum state state);
 extern enum state_group nbd_internal_state_group (enum state state);
-extern enum state_group nbd_internal_state_group_parent (enum state_group 
group);
+extern enum state_group
+  nbd_internal_state_group_parent (enum state_group group);
 extern int nbd_internal_aio_get_direction (enum state state);
 
 #define set_next_state(h,next_state) ((h)->state) = (next_state)

_______________________________________________
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs

Reply via email to