char const *file_full_name = ent->fts_path;
char const *file = ent->fts_accpath;
const struct stat *file_stats = ent->fts_statp;
- struct change_status ch = { 0, };
+ struct change_status ch = {0};
ch.status = CH_NO_STAT;
switch (ent->fts_info)
{
char *srcend = cell + strlen (cell);
char *dst = cell;
- mbstate_t mbstate = { 0, };
+ mbstate_t mbstate = {0};
size_t n;
for (char *src = cell; src != srcend; src += n)
if (0 <= fdout)
FD_SET (fdout, &fds);
- struct timeval delay = { .tv_sec = 0, .tv_usec = 0 };
+ struct timeval delay = {0};
ret = select (nfds,
broken_output ? &fds : nullptr,
broken_output ? nullptr : &fds,
reach its end, replacing each non-printable multibyte
character with a single question mark. */
{
- mbstate_t mbstate = { 0, };
+ mbstate_t mbstate = {0};
do
{
wchar_t wc;
if (*invalid)
{
- mbstate_t mbstate = { 0, };
+ mbstate_t mbstate = {0};
size_t charlen = mbrlen (invalid, filelen - validlen, &mbstate);
error (0, 0,
_("non-portable character %s in file name %s"),
\
if (MB_CUR_MAX > 1 && *(s + 1)) \
{ \
- mbstate_t mbstate = { 0, }; \
+ mbstate_t mbstate = {0}; \
wchar_t wc; \
size_t slen = strlen (s); \
ssize_t bytes; \
main (int argc, char **argv)
{
bool ok = true;
- struct Options flags = { 0, };
+ struct Options flags = {0};
char **file;
int n_files;
int c;
{
if (0 <= ts.tv_nsec)
return ts;
- struct timespec z = {0, 0};
+ struct timespec z = {0};
return z;
}
int fd = STREQ (filename, "-") ? 0 : AT_FDCWD;
int flags = 0;
struct stat st;
- struct statx stx = { 0, };
+ struct statx stx = {0};
char const *pathname = filename;
struct print_args pa;
pa.st = &st;
- pa.btime = (struct timespec) {-1, -1};
+ pa.btime = (struct timespec) {.tv_sec = -1, .tv_nsec = -1};
if (AT_FDCWD != fd)
{
struct stat statbuf;
struct print_args pa;
pa.st = &statbuf;
- pa.btime = (struct timespec) {-1, -1};
+ pa.btime = (struct timespec) {.tv_sec = -1, .tv_nsec = -1};
if (0 <= fd)
{
/* timer_settime() provides potentially nanosecond resolution. */
struct timespec ts = dtotimespec (duration);
- struct itimerspec its = { {0, 0}, ts };
+ struct itimerspec its = {.it_interval = {0}, .it_value = ts};
timer_t timerid;
if (timer_create (CLOCK_REALTIME, nullptr, &timerid) == 0)
{
else
tv.tv_usec--;
}
- struct itimerval it = { {0, 0}, tv };
+ struct itimerval it = {.it_interval = {0}, .it_value = tv };
if (setitimer (ITIMER_REAL, &it, nullptr) == 0)
return;
else
#elif HAVE_SETRLIMIT && defined RLIMIT_CORE
/* Note this doesn't disable processing by a filter in
/proc/sys/kernel/core_pattern on Linux. */
- if (setrlimit (RLIMIT_CORE, &(struct rlimit) {0,0}) == 0)
+ if (setrlimit (RLIMIT_CORE, &(struct rlimit) {0}) == 0)
return true;
#else
{
int c;
int cardinality = N_CHARS;
- bool in_set[N_CHARS] = { 0, };
+ bool in_set[N_CHARS] = {0};
s->state = BEGIN_STATE;
while ((c = get_next (s, nullptr)) != -1)
{
bool in_word = false;
uintmax_t linepos = 0;
- mbstate_t state = { 0, };
+ mbstate_t state = {0};
bool in_shift = false;
# if SUPPORT_OLD_MBRTOWC
/* Back-up the state before each multibyte character conversion and