Skip to content

Commit b2e4dc1

Browse files
author
Tim Woodall
committed
Minor cleanups
. remove unused limits.h include . cleanup whitespace/continuation in macro definition . correct printf to report the values being compared. . correct pthread_mutex_init call take NULL rather than assume (enum) PTHREAD_MUTEX_DEFAULT == 0 Signed-off-by: Tim Woodall <builder@woodall.me.uk>
1 parent 622c138 commit b2e4dc1

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

main.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
#include <stddef.h>
3434
#include <stdbool.h>
3535
#include <string.h>
36-
#include <limits.h>
3736
#include <dirent.h>
3837
#include <assert.h>
3938
#include <errno.h>
@@ -69,9 +68,9 @@
6968

7069
#ifndef TEMP_FAILURE_RETRY
7170
# define TEMP_FAILURE_RETRY(expression) \
72-
(__extension__ ({ long int __result; \
73-
do __result = (long int) (expression); \
74-
while (__result == -1L && errno == EINTR); \
71+
(__extension__({ long int __result; \
72+
do __result = (long int) (expression); \
73+
while (__result == -1L && errno == EINTR); \
7574
__result; }))
7675
#endif
7776

@@ -156,8 +155,8 @@ open_by_handle_at (int mount_fd, struct file_handle *handle, int flags)
156155
#endif
157156

158157
#if defined(__GNUC__) && (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ >= 6) && ! defined __cplusplus
159-
_Static_assert (sizeof (fuse_ino_t) >= sizeof (uintptr_t),
160-
"fuse_ino_t too small to hold uintptr_t values!");
158+
_Static_assert(sizeof (fuse_ino_t) >= sizeof (uintptr_t),
159+
"fuse_ino_t too small to hold uintptr_t values!");
161160
#else
162161
struct _uintptr_to_must_hold_fuse_ino_t_dummy_struct
163162
{
@@ -308,7 +307,7 @@ check_writeable_proc ()
308307

309308
if (svfs.f_type != PROC_SUPER_MAGIC)
310309
{
311-
fprintf (stderr, "invalid file system type found on /proc: %d, expected %d\n", svfs.f_fsid, PROC_SUPER_MAGIC);
310+
fprintf (stderr, "invalid file system type found on /proc: %ld, expected %d\n", (long) svfs.f_type, PROC_SUPER_MAGIC);
312311
return;
313312
}
314313

@@ -5758,7 +5757,7 @@ main (int argc, char *argv[])
57585757

57595758
read_overflowids ();
57605759

5761-
pthread_mutex_init (&lock, PTHREAD_MUTEX_DEFAULT);
5760+
pthread_mutex_init (&lock, NULL);
57625761

57635762
if (opts.show_help)
57645763
{

plugin-manager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ struct ovl_plugin_context *load_plugins (const char *plugins);
3737
/* taken from glibc unistd.h and fixes musl */
3838
#ifndef TEMP_FAILURE_RETRY
3939
#define TEMP_FAILURE_RETRY(expression) \
40-
(__extension__ ({ long int __result; \
40+
(__extension__({ long int __result; \
4141
do __result = (long int) (expression); \
4242
while (__result == -1L && errno == EINTR); \
4343
__result; }))

utils.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
#ifndef TEMP_FAILURE_RETRY
3535
# define TEMP_FAILURE_RETRY(expression) \
36-
(__extension__ ({ long int __result; \
36+
(__extension__({ long int __result; \
3737
do __result = (long int) (expression); \
3838
while (__result == -1L && errno == EINTR); \
3939
__result; }))

0 commit comments

Comments
 (0)