diff options
author | Rich Felker <dalias@aerifal.cx> | 2016-07-03 14:40:11 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2016-07-03 15:02:25 -0400 |
commit | befa5866ee30d09c0c96e88af2eabff5911342ea (patch) | |
tree | a72045d740e0a4b204ef6d742f7f3a3ca12e6c0e /include/sys | |
parent | 093288dcb37a30c634b0a00eb7e2a0dbe72ebf95 (diff) | |
download | musl-befa5866ee30d09c0c96e88af2eabff5911342ea.tar.gz musl-befa5866ee30d09c0c96e88af2eabff5911342ea.tar.xz musl-befa5866ee30d09c0c96e88af2eabff5911342ea.zip |
make brace placement in public header struct definitions consistent
placing the opening brace on the same line as the struct keyword/tag is the style I prefer and seems to be the prevailing practice in more recent additions. these changes were generated by the command: find include/ arch/*/bits -name '*.h' \ -exec sed -i '/^struct [^;{]*$/{N;s/\n/ /;}' {} + and subsequently checked by hand to ensure that the regex did not pick up any false positives.
Diffstat (limited to 'include/sys')
-rw-r--r-- | include/sys/acct.h | 6 | ||||
-rw-r--r-- | include/sys/procfs.h | 3 | ||||
-rw-r--r-- | include/sys/quota.h | 6 | ||||
-rw-r--r-- | include/sys/resource.h | 6 | ||||
-rw-r--r-- | include/sys/socket.h | 15 | ||||
-rw-r--r-- | include/sys/time.h | 3 | ||||
-rw-r--r-- | include/sys/times.h | 3 | ||||
-rw-r--r-- | include/sys/un.h | 3 | ||||
-rw-r--r-- | include/sys/utsname.h | 3 |
9 files changed, 16 insertions, 32 deletions
diff --git a/include/sys/acct.h b/include/sys/acct.h index ee576c4a..9b0ba36f 100644 --- a/include/sys/acct.h +++ b/include/sys/acct.h @@ -14,8 +14,7 @@ extern "C" { typedef uint16_t comp_t; -struct acct -{ +struct acct { char ac_flag; uint16_t ac_uid; uint16_t ac_gid; @@ -36,8 +35,7 @@ struct acct }; -struct acct_v3 -{ +struct acct_v3 { char ac_flag; char ac_version; uint16_t ac_tty; diff --git a/include/sys/procfs.h b/include/sys/procfs.h index 2a928751..e23bf1ad 100644 --- a/include/sys/procfs.h +++ b/include/sys/procfs.h @@ -33,8 +33,7 @@ struct elf_prstatus { #define ELF_PRARGSZ 80 -struct elf_prpsinfo -{ +struct elf_prpsinfo { char pr_state; char pr_sname; char pr_zomb; diff --git a/include/sys/quota.h b/include/sys/quota.h index a06f335a..3ed73785 100644 --- a/include/sys/quota.h +++ b/include/sys/quota.h @@ -57,8 +57,7 @@ extern "C" { #define QIF_TIMES (QIF_BTIME | QIF_ITIME) #define QIF_ALL (QIF_LIMITS | QIF_USAGE | QIF_TIMES) -struct dqblk -{ +struct dqblk { uint64_t dqb_bhardlimit; uint64_t dqb_bsoftlimit; uint64_t dqb_curspace; @@ -87,8 +86,7 @@ struct dqblk #define IIF_FLAGS 4 #define IIF_ALL (IIF_BGRACE | IIF_IGRACE | IIF_FLAGS) -struct dqinfo -{ +struct dqinfo { uint64_t dqi_bgrace; uint64_t dqi_igrace; uint32_t dqi_flags; diff --git a/include/sys/resource.h b/include/sys/resource.h index 6f22a2e7..70d793d5 100644 --- a/include/sys/resource.h +++ b/include/sys/resource.h @@ -19,14 +19,12 @@ extern "C" { typedef unsigned long long rlim_t; -struct rlimit -{ +struct rlimit { rlim_t rlim_cur; rlim_t rlim_max; }; -struct rusage -{ +struct rusage { struct timeval ru_utime; struct timeval ru_stime; /* linux extentions, but useful */ diff --git a/include/sys/socket.h b/include/sys/socket.h index 55e53d2a..59ab1e2f 100644 --- a/include/sys/socket.h +++ b/include/sys/socket.h @@ -20,15 +20,13 @@ extern "C" { #include <bits/socket.h> #ifdef _GNU_SOURCE -struct ucred -{ +struct ucred { pid_t pid; uid_t uid; gid_t gid; }; -struct mmsghdr -{ +struct mmsghdr { struct msghdr msg_hdr; unsigned int msg_len; }; @@ -39,8 +37,7 @@ int sendmmsg (int, struct mmsghdr *, unsigned int, unsigned int); int recvmmsg (int, struct mmsghdr *, unsigned int, unsigned int, struct timespec *); #endif -struct linger -{ +struct linger { int l_onoff; int l_linger; }; @@ -297,14 +294,12 @@ struct linger #define SCM_RIGHTS 0x01 #define SCM_CREDENTIALS 0x02 -struct sockaddr -{ +struct sockaddr { sa_family_t sa_family; char sa_data[14]; }; -struct sockaddr_storage -{ +struct sockaddr_storage { sa_family_t ss_family; char __ss_padding[128-sizeof(long)-sizeof(sa_family_t)]; unsigned long __ss_align; diff --git a/include/sys/time.h b/include/sys/time.h index bfe1414e..e4b379ae 100644 --- a/include/sys/time.h +++ b/include/sys/time.h @@ -17,8 +17,7 @@ int gettimeofday (struct timeval *__restrict, void *__restrict); #define ITIMER_VIRTUAL 1 #define ITIMER_PROF 2 -struct itimerval -{ +struct itimerval { struct timeval it_interval; struct timeval it_value; }; diff --git a/include/sys/times.h b/include/sys/times.h index cc55e573..80a50522 100644 --- a/include/sys/times.h +++ b/include/sys/times.h @@ -8,8 +8,7 @@ extern "C" { #define __NEED_clock_t #include <bits/alltypes.h> -struct tms -{ +struct tms { clock_t tms_utime; clock_t tms_stime; clock_t tms_cutime; diff --git a/include/sys/un.h b/include/sys/un.h index 7494f1a3..1a3193ad 100644 --- a/include/sys/un.h +++ b/include/sys/un.h @@ -14,8 +14,7 @@ extern "C" { #include <bits/alltypes.h> -struct sockaddr_un -{ +struct sockaddr_un { sa_family_t sun_family; char sun_path[108]; }; diff --git a/include/sys/utsname.h b/include/sys/utsname.h index 6b9ea970..2c80fb5a 100644 --- a/include/sys/utsname.h +++ b/include/sys/utsname.h @@ -7,8 +7,7 @@ extern "C" { #include <features.h> -struct utsname -{ +struct utsname { char sysname[65]; char nodename[65]; char release[65]; |