diff options
author | Frej Drejhammar <frej.drejhammar@gmail.com> | 2023-04-06 08:54:16 +0200 |
---|---|---|
committer | Frej Drejhammar <frej.drejhammar@gmail.com> | 2023-04-06 09:02:33 +0200 |
commit | d5fe11a8925293c83da777c2af7d8211d6a035ab (patch) | |
tree | 064d9e0d358dd196e90774a2649671a4bb1f87c0 /erts/etc | |
parent | c101574adf0c562650e0baf2a8d14e8ab61d91a6 (diff) | |
download | erlang-d5fe11a8925293c83da777c2af7d8211d6a035ab.tar.gz |
erts: Modernize K&R-style functions
Clang 16 now warns about functions using K&R syntax. Instead of
juggling with compiler warning options, it is better to just bite the
bullet and modernize the source code.
Diffstat (limited to 'erts/etc')
-rw-r--r-- | erts/etc/common/heart.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/erts/etc/common/heart.c b/erts/etc/common/heart.c index 297e41dca2..f45c18f3e6 100644 --- a/erts/etc/common/heart.c +++ b/erts/etc/common/heart.c @@ -354,8 +354,7 @@ int main(int argc, char **argv) { * message loop */ static int -message_loop(erlin_fd, erlout_fd) - int erlin_fd, erlout_fd; +message_loop(int erlin_fd, int erlout_fd) { int i; time_t now, last_received; @@ -776,8 +775,7 @@ int wait_until_close_write_or_env_tmo(int tmo) { * Sends an HEART_ACK. */ static int -notify_ack(fd) - int fd; +notify_ack(int fd) { struct msg m; @@ -824,9 +822,7 @@ heart_cmd_reply(int fd, char *s) * FIXME. */ static int -write_message(fd, mp) - int fd; - struct msg *mp; +write_message(int fd, struct msg *mp) { int len = ntohs(mp->len); @@ -853,9 +849,7 @@ write_message(fd, mp) * message. */ static int -read_message(fd, mp) - int fd; - struct msg *mp; +read_message(int fd, struct msg *mp) { int rlen, i; unsigned char* tmp; @@ -891,9 +885,7 @@ read_message(fd, mp) * bytes read (i.e. len) , 0 if eof, or < 0 if error. len must be > 0. */ static int -read_fill(fd, buf, len) - int fd, len; - char *buf; +read_fill(int fd, char *buf, int len) { int i, got = 0; @@ -914,9 +906,7 @@ read_fill(fd, buf, len) * 0 if eof, or < 0 if error. len > maxlen > 0 must hold. */ static int -read_skip(fd, buf, maxlen, len) - int fd, maxlen, len; - char *buf; +read_skip(int fd, char *buf, int maxlen, int len) { int i, got = 0; char c; |