Skip to content

Commit

Permalink
coding style: add parentheses after the sizeof operator
Browse files Browse the repository at this point in the history
Signed-off-by: Ferenc Wágner <wferi@debian.org>
  • Loading branch information
wferi authored and fabbione committed Apr 26, 2018
1 parent c460d5b commit f5623c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libknet/logging.c
Expand Up @@ -235,7 +235,7 @@ void log_msg(knet_handle_t knet_h, uint8_t subsystem, uint8_t msglevel,
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wformat-nonliteral"
#endif
vsnprintf(msg.msg, sizeof msg.msg, fmt, ap);
vsnprintf(msg.msg, sizeof(msg.msg), fmt, ap);
#ifdef __clang__
#pragma clang diagnostic pop
#endif
Expand Down
4 changes: 2 additions & 2 deletions libknet/tests/test-common.c
Expand Up @@ -220,9 +220,9 @@ void flush_logs(int logfd, FILE *std)
while (1) {
struct knet_log_msg msg;

for (size_t bytes_read = 0; bytes_read < sizeof msg; ) {
for (size_t bytes_read = 0; bytes_read < sizeof(msg); ) {
int len = read(logfd, &msg + bytes_read,
sizeof msg - bytes_read);
sizeof(msg) - bytes_read);
if (len <= 0) {
return;
}
Expand Down

0 comments on commit f5623c2

Please sign in to comment.