Use new Gnulib streq function instead of rolling our own macro.
* bootstrap.conf (gnulib_modules): Add stringeq.
* src/rm.c (main): Don’t assume streq is a macro that expands to (...),
as it is now a function.
* src/system.h:
* tests/df/no-mtab-status.sh, tests/df/skip-duplicates.sh:
(STREQ): Remove. All uses replaced by streq.
stpcpy
str_endswith
strdup-posix
+ stringeq
strnlen
strnumcmp
strsignal
# define ROOT_DEV_INO_WARN(Dirname) \
do \
{ \
- if (STREQ (Dirname, "/")) \
+ if (streq (Dirname, "/")) \
error (0, 0, _("it is dangerous to operate recursively on %s"), \
quoteaf (Dirname)); \
else \
{
if (fclose (in) != 0)
{
- if (STREQ (infile, "-"))
+ if (streq (infile, "-"))
error (EXIT_FAILURE, errno, _("closing standard input"));
else
error (EXIT_FAILURE, errno, "%s", quotef (infile));
else
infile = "-";
- if (STREQ (infile, "-"))
+ if (streq (infile, "-"))
{
xset_binary_mode (STDIN_FILENO, O_BINARY);
input_fh = stdin;
if (argind < argc)
infile = argv[argind];
- bool reading_stdin = STREQ (infile, "-");
+ bool reading_stdin = streq (infile, "-");
if (reading_stdin)
{
have_read_stdin = true;
context_string = specified_context;
}
- if (file_context == nullptr || ! STREQ (context_string, file_context))
+ if (file_context == nullptr || ! streq (context_string, file_context))
{
int fail = (affect_symlink_referent
? setfileconat (fd, file, context_string)
is_root (char const *dir)
{
char *resolved = canonicalize_file_name (dir);
- bool is_res_root = resolved && STREQ ("/", resolved);
+ bool is_res_root = resolved && streq ("/", resolved);
free (resolved);
return is_res_root;
}
alt[i][0] = 0;
alt[i][1] = 0;
alt[i][2] = 0;
- streams[i] = (STREQ (infiles[i], "-") ? stdin : fopen (infiles[i], "r"));
+ streams[i] = (streq (infiles[i], "-") ? stdin : fopen (infiles[i], "r"));
if (!streams[i])
error (EXIT_FAILURE, errno, "%s", quotef (infiles[i]));
break;
case OUTPUT_DELIMITER_OPTION:
- if (col_sep_len && !STREQ (col_sep, optarg))
+ if (col_sep_len && !streq (col_sep, optarg))
error (EXIT_FAILURE, 0, _("multiple output delimiters specified"));
col_sep = optarg;
col_sep_len = *optarg ? strlen (optarg) : 1;
size_t suffixlen = strlen (simple_backup_suffix);
if (! (srcbaselen == dstbaselen + suffixlen
&& memcmp (srcbase, dstbase, dstbaselen) == 0
- && STREQ (srcbase + dstbaselen, simple_backup_suffix)))
+ && streq (srcbase + dstbaselen, simple_backup_suffix)))
return false;
char *dst_back = subst_suffix (dst_relname,
dst_relname + strlen (dst_relname),
dst_parent = dir_name (dst_relname);
- in_current_dir = ((dst_dirfd == AT_FDCWD && STREQ (".", dst_parent))
+ in_current_dir = ((dst_dirfd == AT_FDCWD && streq (".", dst_parent))
/* If either stat call fails, it's ok not to report
the failure and say dst_name is in the current
directory. Other things will fail later. */
areadlinkat_with_size (dst_dirfd, dst_relname, dst_sb.st_size);
if (dest_link_val)
{
- if (STREQ (dest_link_val, src_link_val))
+ if (streq (dest_link_val, src_link_val))
symlink_err = 0;
free (dest_link_val);
}
if (false);
/* Look up the right main program. */
# define SINGLE_BINARY_PROGRAM(prog_name_str, main_name) \
- else if (STREQ (prog_name_str, prog_name)) \
+ else if (streq (prog_name_str, prog_name)) \
prog_main = single_binary_main_##main_name;
# include "coreutils.h"
# undef SINGLE_BINARY_PROGRAM
/* Map external name to internal name. */
char ginstall[] = "ginstall";
- if (STREQ (prog_name, "install"))
+ if (streq (prog_name, "install"))
prog_name = ginstall;
/* If this program is called directly as "coreutils" or if the value of
/* Only print the error message when no options have been passed
to coreutils. */
- if (optind == 1 && prog_name && !STREQ (prog_name, "coreutils"))
+ if (optind == 1 && prog_name && !streq (prog_name, "coreutils"))
error (0, 0, _("unknown program %s"),
quote (prog_name));
ASSIGN_STRDUPA (arg_base, last_component (arg));
strip_trailing_slashes (arg_base);
/* For 'cp -R source/.. dest', don't copy into 'dest/..'. */
- arg_base += STREQ (arg_base, "..");
+ arg_base += streq (arg_base, "..");
dst_name = file_name_concat (target_directory, arg_base,
&arg_in_concat);
}
if (x->unlink_dest_after_failed_open
&& x->backup_type != no_backups
- && STREQ (source, dest)
+ && streq (source, dest)
&& !new_dst
&& (sb.st_mode != 0 || stat (dest, &sb) == 0) && S_ISREG (sb.st_mode))
{
static void
set_input_file (char const *name)
{
- if (! STREQ (name, "-") && fd_reopen (STDIN_FILENO, name, O_RDONLY, 0) < 0)
+ if (! streq (name, "-") && fd_reopen (STDIN_FILENO, name, O_RDONLY, 0) < 0)
error (EXIT_FAILURE, errno, _("cannot open %s for reading"),
quoteaf (name));
}
{
FILE *stream;
- if (STREQ (file, "-"))
+ if (streq (file, "-"))
{
have_read_stdin = true;
stream = stdin;
int err = errno;
if (!ferror (stream))
err = 0;
- if (STREQ (file, "-"))
+ if (streq (file, "-"))
clearerr (stream); /* Also clear EOF. */
else if (fclose (stream) == EOF)
err = errno;
size_t buflen;
struct timespec when;
- if (STREQ (input_filename, "-"))
+ if (streq (input_filename, "-"))
{
input_filename = _("standard input");
in_stream = stdin;
display_field_t field = INVALID_FIELD;
for (idx_t i = 0; i < ARRAY_CARDINALITY (field_data); i++)
{
- if (STREQ (field_data[i].arg, s))
+ if (streq (field_data[i].arg, s))
{
field = i;
break;
if (fs_select_list == nullptr || fstype == nullptr)
return true;
for (fsp = fs_select_list; fsp; fsp = fsp->fs_next)
- if (STREQ (fstype, fsp->fs_name))
+ if (streq (fstype, fsp->fs_name))
return true;
return false;
}
if (fs_exclude_list == nullptr || fstype == nullptr)
return false;
for (fsp = fs_exclude_list; fsp; fsp = fsp->fs_next)
- if (STREQ (fstype, fsp->fs_name))
+ if (streq (fstype, fsp->fs_name))
return true;
return false;
}
< strlen (me->me_mntroot));
if (! print_grand_total
&& me->me_remote && seen_dev->me->me_remote
- && ! STREQ (seen_dev->me->me_devname, me->me_devname))
+ && ! streq (seen_dev->me->me_devname, me->me_devname))
{
/* Don't discard remote entries with different locations,
as these are more likely to be explicitly mounted.
/* let points towards the root of the device win. */
|| (target_nearer_root && ! source_below_root)
/* let an entry overmounted on a new device win... */
- || (! STREQ (seen_dev->me->me_devname, me->me_devname)
+ || (! streq (seen_dev->me->me_devname, me->me_devname)
/* ... but only when matching an existing mnt point,
to avoid problematic replacement when given
inaccurate mount lists, seen with some chroot
environments for example. */
- && STREQ (me->me_mountdir,
+ && streq (me->me_mountdir,
seen_dev->me->me_mountdir)))
{
/* Discard mount entry for existing device. */
if (stat (stat_file, &sb) == 0)
{
struct mount_entry const * dev_me = me_for_dev (sb.st_dev);
- if (dev_me && ! STREQ (dev_me->me_devname, device)
+ if (dev_me && ! streq (dev_me->me_devname, device)
&& (! dev_me->me_remote || ! me_remote))
{
fstype = "-";
for (me = mount_list; me; me = me->me_next)
{
- if (STREQ (me->me_mountdir, mount))
+ if (streq (me->me_mountdir, mount))
le = me;
}
if (canon_dev && IS_ABSOLUTE_FILE_NAME (canon_dev))
devname = canon_dev;
- if (STREQ (device, devname))
+ if (streq (device, devname))
{
char *last_device = last_device_for_mount (me->me_mountdir);
- eclipsed_device = last_device && ! STREQ (last_device, devname);
+ eclipsed_device = last_device && ! streq (last_device, devname);
size_t len = strlen (me->me_mountdir);
if (! eclipsed_device
for (me = mount_list; me; me = me->me_next)
{
- if (!STREQ (me->me_type, "lofs")
+ if (!streq (me->me_type, "lofs")
&& (!best_match || best_match->me_dummy || !me->me_dummy))
{
size_t len = strlen (me->me_mountdir);
}
if (statp->st_dev == me->me_dev
- && !STREQ (me->me_type, "lofs")
+ && !streq (me->me_type, "lofs")
&& (!best_match || best_match->me_dummy || !me->me_dummy))
{
/* Skip bogus mtab entries. */
struct fs_type_list *fs_excl;
for (fs_excl = fs_exclude_list; fs_excl; fs_excl = fs_excl->fs_next)
{
- if (STREQ (fs_incl->fs_name, fs_excl->fs_name))
+ if (streq (fs_incl->fs_name, fs_excl->fs_name))
{
error (0, 0,
_("file system type %s both selected and excluded"),
bool length_specified = s[i] == '-';
bool openssl_format = s[i] == '('; /* and no length_specified */
s[i++] = '\0';
- if (!STREQ (algo_name, DIGEST_TYPE_STRING))
+ if (!streq (algo_name, DIGEST_TYPE_STRING))
return false;
if (openssl_format)
s[--i] = '(';
{
FILE *fp;
int err;
- bool is_stdin = STREQ (filename, "-");
+ bool is_stdin = streq (filename, "-");
*missing = false;
uintmax_t line_number;
char *line;
size_t line_chars_allocated;
- bool is_stdin = STREQ (checkfile_name, "-");
+ bool is_stdin = streq (checkfile_name, "-");
if (is_stdin)
{
size_t d_len;
if (! (split_3 (line, line_length, &digest, &d_len, &binary, &filename)
- && ! (is_stdin && STREQ (filename, "-"))))
+ && ! (is_stdin && streq (filename, "-"))))
{
++n_misformatted_lines;
shell = last_component (shell);
- if (STREQ (shell, "csh") || STREQ (shell, "tcsh"))
+ if (streq (shell, "csh") || streq (shell, "tcsh"))
return SHELL_SYNTAX_C;
return SHELL_SYNTAX_BOURNE;
{
bool ok;
- if (! STREQ (filename, "-") && freopen (filename, "r", stdin) == nullptr)
+ if (! streq (filename, "-") && freopen (filename, "r", stdin) == nullptr)
{
error (0, errno, "%s", quotef (filename));
return false;
time_style = getenv ("TIME_STYLE");
/* Ignore TIMESTYLE="locale", for compatibility with ls. */
- if (! time_style || STREQ (time_style, "locale"))
+ if (! time_style || streq (time_style, "locale"))
time_style = "long-iso";
else if (*time_style == '+')
{
usage (EXIT_FAILURE);
}
- if (! (STREQ (files_from, "-") || freopen (files_from, "r", stdin)))
+ if (! (streq (files_from, "-") || freopen (files_from, "r", stdin)))
error (EXIT_FAILURE, errno, _("cannot open %s for reading"),
quoteaf (files_from));
affirm (!"unexpected error code from argv_iter");
}
}
- if (files_from && STREQ (files_from, "-") && STREQ (file_name, "-"))
+ if (files_from && streq (files_from, "-") && streq (file_name, "-"))
{
/* Give a better diagnostic in an unusual case:
printf - | du --files0-from=- */
bool posixly_correct = !!getenv ("POSIXLY_CORRECT");
bool allow_options =
(! posixly_correct
- || (! DEFAULT_ECHO_TO_XPG && 1 < argc && STREQ (argv[1], "-n")));
+ || (! DEFAULT_ECHO_TO_XPG && 1 < argc && streq (argv[1], "-n")));
/* System V machines already have a /bin/sh with a v9 behavior.
Use the identical behavior for these machines so that the
order to avoid accepting abbreviations. */
if (allow_options && argc == 2)
{
- if (STREQ (argv[1], "--help"))
+ if (streq (argv[1], "--help"))
usage (EXIT_SUCCESS);
- if (STREQ (argv[1], "--version"))
+ if (streq (argv[1], "--version"))
{
version_etc (stdout, PROGRAM_NAME, PACKAGE_NAME, Version, AUTHORS,
(char *) nullptr);
}
}
- if (optind < argc && STREQ (argv[optind], "-"))
+ if (optind < argc && streq (argv[optind], "-"))
{
ignore_environment = true;
++optind;
int err = errno;
if (!ferror (fp))
err = 0;
- if (STREQ (prev_file, "-"))
+ if (streq (prev_file, "-"))
clearerr (fp); /* Also clear EOF. */
else if (fclose (fp) != 0)
err = errno;
while ((file = *file_list++) != nullptr)
{
- if (STREQ (file, "-"))
+ if (streq (file, "-"))
{
have_read_stdin = true;
fp = stdin;
/* The above handles --help and --version.
Since there is no other invocation of getopt, handle '--' here. */
- if (1 < argc && STREQ (argv[1], "--"))
+ if (1 < argc && streq (argv[1], "--"))
{
--argc;
++argv;
return false;
else
{
- bool r = STREQ (*args, str);
+ bool r = streq (*args, str);
args += r;
return r;
}
for (; optind < argc; optind++)
{
char *file = argv[optind];
- if (STREQ (file, "-"))
+ if (streq (file, "-"))
{
ok &= fmt (stdin, file);
have_read_stdin = true;
static size_t length_in = 0;
int saved_errno;
- if (STREQ (filename, "-"))
+ if (streq (filename, "-"))
{
istream = stdin;
have_read_stdin = true;
if (offset_out)
write_out (line_out, offset_out, /*newline=*/ false);
- if (STREQ (filename, "-"))
+ if (streq (filename, "-"))
clearerr (istream);
else if (fclose (istream) != 0 && !saved_errno)
saved_errno = errno;
{
int fd;
bool ok;
- bool is_stdin = STREQ (filename, "-");
+ bool is_stdin = streq (filename, "-");
if (is_stdin)
{
return true;
}
- scontext_match = STREQ (file_scontext_raw, to_scontext_raw);
+ scontext_match = streq (file_scontext_raw, to_scontext_raw);
freecon (file_scontext_raw);
freecon (to_scontext_raw);
break;
case 'e':
- if (empty_filler && ! STREQ (empty_filler, optarg))
+ if (empty_filler && ! streq (empty_filler, optarg))
error (EXIT_FAILURE, 0,
_("conflicting empty-field replacement strings"));
empty_filler = optarg;
break;
case 'o':
- if (STREQ (optarg, "auto"))
+ if (streq (optarg, "auto"))
autoformat = true;
else
{
newtab = mcel_ch ('\n', 1);
/* output_separator does not matter. */
}
- else if (STREQ (optarg, "\\0"))
+ else if (streq (optarg, "\\0"))
{
newtab = mcel_ch ('\0', 1);
output_separator = "";
if (join_field_2 < 0)
join_field_2 = 0;
- fp1 = STREQ (g_names[0], "-") ? stdin : fopen (g_names[0], "r");
+ fp1 = streq (g_names[0], "-") ? stdin : fopen (g_names[0], "r");
if (!fp1)
error (EXIT_FAILURE, errno, "%s", quotef (g_names[0]));
- fp2 = STREQ (g_names[1], "-") ? stdin : fopen (g_names[1], "r");
+ fp2 = streq (g_names[1], "-") ? stdin : fopen (g_names[1], "r");
if (!fp2)
error (EXIT_FAILURE, errno, "%s", quotef (g_names[1]));
if (fp1 == fp2)
{
FILE *stream;
- if (STREQ (file, "-"))
+ if (streq (file, "-"))
{
have_read_stdin = true;
stream = stdin;
int err = errno;
if (!ferror (stream))
err = 0;
- if (STREQ (file, "-"))
+ if (streq (file, "-"))
clearerr (stream); /* Also clear EOF. */
else if (fclose (stream) != 0 && !err)
err = errno;
0, XTOINT_MIN_RANGE);
break;
case 'n':
- if (STREQ (optarg, "ln"))
+ if (streq (optarg, "ln"))
lineno_format = FORMAT_LEFT;
- else if (STREQ (optarg, "rn"))
+ else if (streq (optarg, "rn"))
lineno_format = FORMAT_RIGHT_NOLZ;
- else if (STREQ (optarg, "rz"))
+ else if (streq (optarg, "rz"))
lineno_format = FORMAT_RIGHT_LZ;
else
{
{
char *possible_suffix = text + strlen (text) - strlen (suffix);
- if (STREQ (suffix, possible_suffix))
+ if (streq (suffix, possible_suffix))
{
/* trim suffix, ONLY if it's at the end of the text. */
*possible_suffix = '\0';
return ok;
++file_list;
- if (STREQ (input_filename, "-"))
+ if (streq (input_filename, "-"))
{
input_filename = _("standard input");
in_stream = stdin;
{
if (!ferror (in_stream))
in_errno = 0;
- if (STREQ (file_list[-1], "-"))
+ if (streq (file_list[-1], "-"))
clearerr (in_stream);
else if (fclose (in_stream) != 0 && !in_errno)
in_errno = errno;
for (files_open = 0; files_open < nfiles; ++files_open)
{
- if (STREQ (fnamptr[files_open], "-"))
+ if (streq (fnamptr[files_open], "-"))
{
have_read_stdin = true;
fileptr[files_open] = stdin;
for (; nfiles; nfiles--, fnamptr++)
{
int saved_errno;
- bool is_stdin = STREQ (*fnamptr, "-");
+ bool is_stdin = streq (*fnamptr, "-");
if (is_stdin)
{
have_read_stdin = true;
if (argc_names)
{
for (int i = 0; i < argc_names; i++)
- if (STREQ (utmp_buf->ut_user, argv_names[i]))
+ if (streq (utmp_buf->ut_user, argv_names[i]))
{
print_entry (utmp_buf);
break;
static bool
open_file (char *name, COLUMN *p)
{
- if (STREQ (name, "-"))
+ if (streq (name, "-"))
{
p->name = _("standard input");
p->fp = stdin;
struct tm tm;
/* If parallel files or standard input, use current date. */
- if (STREQ (filename, "-"))
+ if (streq (filename, "-"))
desc = -1;
if (0 <= desc && fstat (desc, &st) == 0)
t = get_stat_mtime (&st);
order to avoid accepting abbreviations. */
if (argc == 2)
{
- if (STREQ (argv[1], "--help"))
+ if (streq (argv[1], "--help"))
usage (EXIT_SUCCESS);
- if (STREQ (argv[1], "--version"))
+ if (streq (argv[1], "--version"))
{
version_etc (stdout, PROGRAM_NAME, PACKAGE_NAME, Version, AUTHORS,
(char *) nullptr);
/* The above handles --help and --version.
Since there is no other invocation of getopt, handle '--' here. */
- if (1 < argc && STREQ (argv[1], "--"))
+ if (1 < argc && streq (argv[1], "--"))
{
--argc;
++argv;
/* As special cases, a file name which is null or "-" indicates standard
input, which is already opened. In all other cases, open the file from
its name. */
- bool using_stdin = !file_name || !*file_name || STREQ (file_name, "-");
+ bool using_stdin = !file_name || !*file_name || streq (file_name, "-");
if (using_stdin)
block->start = fread_file (stdin, 0, &used_length);
else
for (file_index = 0; file_index < number_input_files; file_index++)
{
- if (!*argv[optind] || STREQ (argv[optind], "-"))
+ if (!*argv[optind] || streq (argv[optind], "-"))
input_file_name[file_index] = nullptr;
else
input_file_name[file_index] = argv[optind];
input_file_name = xmalloc (sizeof *input_file_name);
file_line_count = xmalloc (sizeof *file_line_count);
text_buffers = xmalloc (sizeof *text_buffers);
- if (!*argv[optind] || STREQ (argv[optind], "-"))
+ if (!*argv[optind] || streq (argv[optind], "-"))
input_file_name[0] = nullptr;
else
input_file_name[0] = argv[optind];
break;
case NO_PRESERVE_ROOT:
- if (! STREQ (argv[optind - 1], "--no-preserve-root"))
+ if (! streq (argv[optind - 1], "--no-preserve-root"))
error (EXIT_FAILURE, 0,
_("you may not abbreviate the --no-preserve-root option"));
preserve_root = false;
case PRESERVE_ROOT:
if (optarg)
{
- if STREQ (optarg, "all")
+ if (streq (optarg, "all"))
x.preserve_all_root = true;
else
error (EXIT_FAILURE, 0,
if (x0_strlen < 0)
xalloc_die ();
x0_str[x0_strlen - layout.suffix_len] = '\0';
- print_extra_number = !STREQ (x0_str, x_str);
+ print_extra_number = !streq (x0_str, x_str);
free (x0_str);
}
/* Collect and store in RP the range end points. */
/* Special case: '--field=-' means all fields, emulate '--field=1-' . */
- if ((options & SETFLD_ALLOW_DASH) && STREQ (fieldstr,"-"))
+ if ((options & SETFLD_ALLOW_DASH) && streq (fieldstr,"-"))
{
value = 1;
lhs_specified = true;
= human_readable (offset, offset_buf,
human_floor | human_progress_opts, 1, 1);
- if (done || !STREQ (previous_human_offset, human_offset))
+ if (done || !streq (previous_human_offset, human_offset))
{
if (! known (size))
error (0, 0, _("%s: pass %lu/%lu (%s)...%s"),
break;
case RANDOM_SOURCE_OPTION:
- if (random_source && !STREQ (random_source, optarg))
+ if (random_source && !streq (random_source, optarg))
error (EXIT_FAILURE, 0, _("multiple random sources specified"));
random_source = optarg;
break;
for (i = 0; i < n_files; i++)
{
char *qname = xstrdup (quotef (file[i]));
- if (STREQ (file[i], "-"))
+ if (streq (file[i], "-"))
{
ok &= wipefd (STDOUT_FILENO, qname, randint_source, &flags);
}
break;
case 'o':
- if (outfile && !STREQ (outfile, optarg))
+ if (outfile && !streq (outfile, optarg))
error (EXIT_FAILURE, 0, _("multiple output files specified"));
outfile = optarg;
break;
case RANDOM_SOURCE_OPTION:
- if (random_source && !STREQ (random_source, optarg))
+ if (random_source && !streq (random_source, optarg))
error (EXIT_FAILURE, 0, _("multiple random sources specified"));
random_source = optarg;
break;
{
/* If an input file is specified, re-open it as stdin. */
if (n_operands == 1
- && ! (STREQ (operand[0], "-")
+ && ! (streq (operand[0], "-")
|| freopen (operand[0], "r", stdin)))
error (EXIT_FAILURE, errno, "%s", quotef (operand[0]));
if (*how == 'r')
{
- if (STREQ (file, "-"))
+ if (streq (file, "-"))
{
have_read_stdin = true;
fp = stdin;
size_t worst_case;
if ((i < nfps ? fstat (fileno (fps[i]), &st)
- : STREQ (files[i], "-") ? fstat (STDIN_FILENO, &st)
+ : streq (files[i], "-") ? fstat (STDIN_FILENO, &st)
: stat (files[i], &st))
!= 0)
sort_die (_("stat failed"), files[i]);
for (size_t i = ntemps; i < nfiles; i++)
{
- bool is_stdin = STREQ (files[i].name, "-");
+ bool is_stdin = streq (files[i].name, "-");
bool same;
struct stat instat;
- if (outfile && STREQ (outfile, files[i].name) && !is_stdin)
+ if (outfile && streq (outfile, files[i].name) && !is_stdin)
same = true;
else
{
{
for (size_t i = 0; i < nfiles; i++)
{
- if (STREQ (files[i], "-"))
+ if (streq (files[i], "-"))
continue;
if (euidaccess (files[i], R_OK) != 0)
break;
case COMPRESS_PROGRAM_OPTION:
- if (compress_program && !STREQ (compress_program, optarg))
+ if (compress_program && !streq (compress_program, optarg))
error (SORT_FAILURE, 0, _("multiple compress programs specified"));
compress_program = optarg;
break;
break;
case 'o':
- if (outfile && !STREQ (outfile, optarg))
+ if (outfile && !streq (outfile, optarg))
error (SORT_FAILURE, 0, _("multiple output files specified"));
outfile = optarg;
break;
case RANDOM_SOURCE_OPTION:
- if (random_source && !STREQ (random_source, optarg))
+ if (random_source && !streq (random_source, optarg))
error (SORT_FAILURE, 0, _("multiple random sources specified"));
random_source = optarg;
break;
error (SORT_FAILURE, 0, _("empty tab"));
if (optarg[1])
{
- if (STREQ (optarg, "\\0"))
+ if (streq (optarg, "\\0"))
newtab = '\0';
else
{
nfiles = tok.n_tok;
for (size_t i = 0; i < nfiles; i++)
{
- if (STREQ (files[i], "-"))
+ if (streq (files[i], "-"))
error (SORT_FAILURE, 0, _("when reading file names from "
"standard input, "
"no file name of %s allowed"),
error (EXIT_FAILURE, 0, _("empty record separator"));
if (optarg[1])
{
- if (STREQ (optarg, "\\0"))
+ if (streq (optarg, "\\0"))
neweol = '\0';
else
{
}
/* Open the input file. */
- if (! STREQ (infile, "-")
+ if (! streq (infile, "-")
&& fd_reopen (STDIN_FILENO, infile, O_RDONLY, 0) < 0)
error (EXIT_FAILURE, errno, _("cannot open %s for reading"),
quoteaf (infile));
for (me = mount_list; me; me = me->me_next)
{
if (me->me_dummy && me->me_devname[0] == '/'
- && STREQ (me->me_mountdir, name))
+ && streq (me->me_mountdir, name))
{
struct stat dev_stats;
{
STRUCT_STATVFS statfsbuf;
- if (STREQ (filename, "-"))
+ if (streq (filename, "-"))
{
error (0, 0, _("using %s to denote standard input does not work"
" in file system mode"), quoteaf (filename));
static bool
do_stat (char const *filename, char const *format, char const *format2)
{
- int fd = STREQ (filename, "-") ? 0 : AT_FDCWD;
+ int fd = streq (filename, "-") ? 0 : AT_FDCWD;
int flags = 0;
struct stat st;
struct statx stx = {0};
do_stat (char const *filename, char const *format,
char const *format2)
{
- int fd = STREQ (filename, "-") ? 0 : -1;
+ int fd = streq (filename, "-") ? 0 : -1;
struct stat statbuf;
struct print_args pa;
pa.st = &statbuf;
usage (EXIT_CANCELED);
}
- if (!STREQ (optarg, "L")
+ if (!streq (optarg, "L")
&& parse_size (optarg, &stdbuf[opt_fileno].size) == -1)
error (EXIT_CANCELED, errno, _("invalid mode %s"), quote (optarg));
++arg;
reversed = true;
}
- if (STREQ (arg, "drain"))
+ if (streq (arg, "drain"))
{
tcsetattr_options = reversed ? TCSANOW : TCSADRAIN;
continue;
}
for (i = 0; mode_info[i].name != nullptr; ++i)
{
- if (STREQ (arg, mode_info[i].name))
+ if (streq (arg, mode_info[i].name))
{
if ((mode_info[i].flags & NO_SETATTR) == 0)
{
{
for (i = 0; control_info[i].name != nullptr; ++i)
{
- if (STREQ (arg, control_info[i].name))
+ if (streq (arg, control_info[i].name))
{
check_argument (arg);
match_found = true;
}
if (!match_found || not_set_attr)
{
- if (STREQ (arg, "ispeed"))
+ if (streq (arg, "ispeed"))
{
check_argument (arg);
++k;
continue;
*require_set_attr = true;
}
- else if (STREQ (arg, "ospeed"))
+ else if (streq (arg, "ospeed"))
{
check_argument (arg);
++k;
#ifdef TIOCEXT
/* This is the BSD interface to "extproc".
Even though it's an lflag, an ioctl is used to set it. */
- else if (STREQ (arg, "extproc"))
+ else if (streq (arg, "extproc"))
{
int val = ! reversed;
}
#endif
#ifdef TIOCGWINSZ
- else if (STREQ (arg, "rows"))
+ else if (streq (arg, "rows"))
{
check_argument (arg);
++k;
set_window_size (integer_arg (settings[k], INT_MAX), -1,
device_name);
}
- else if (STREQ (arg, "cols")
- || STREQ (arg, "columns"))
+ else if (streq (arg, "cols")
+ || streq (arg, "columns"))
{
check_argument (arg);
++k;
set_window_size (-1, integer_arg (settings[k], INT_MAX),
device_name);
}
- else if (STREQ (arg, "size"))
+ else if (streq (arg, "size"))
{
if (checking)
continue;
}
#endif
#ifdef HAVE_C_LINE
- else if (STREQ (arg, "line"))
+ else if (streq (arg, "line"))
{
check_argument (arg);
++k;
*require_set_attr = true;
}
#endif
- else if (STREQ (arg, "speed"))
+ else if (streq (arg, "speed"))
{
if (checking)
continue;
default:
/* Consider "drain" as an option rather than a setting,
to support: alias stty='stty -drain' etc. */
- if (! STREQ (argv[argi + opti], "-drain")
- && ! STREQ (argv[argi + opti], "drain"))
+ if (! streq (argv[argi + opti], "-drain")
+ && ! streq (argv[argi + opti], "drain"))
noargs = false;
/* Skip the argument containing this unrecognized option;
if (bitsp == nullptr)
{
/* Combination mode. */
- if (STREQ (info->name, "evenp") || STREQ (info->name, "parity"))
+ if (streq (info->name, "evenp") || streq (info->name, "parity"))
{
if (reversed)
mode->c_cflag = (mode->c_cflag & ~PARENB & ~CSIZE) | CS8;
else
mode->c_cflag = (mode->c_cflag & ~PARODD & ~CSIZE) | PARENB | CS7;
}
- else if (STREQ (info->name, "oddp"))
+ else if (streq (info->name, "oddp"))
{
if (reversed)
mode->c_cflag = (mode->c_cflag & ~PARENB & ~CSIZE) | CS8;
else
mode->c_cflag = (mode->c_cflag & ~CSIZE) | CS7 | PARODD | PARENB;
}
- else if (STREQ (info->name, "nl"))
+ else if (streq (info->name, "nl"))
{
if (reversed)
{
#endif
}
}
- else if (STREQ (info->name, "ek"))
+ else if (streq (info->name, "ek"))
{
mode->c_cc[VERASE] = CERASE;
mode->c_cc[VKILL] = CKILL;
}
- else if (STREQ (info->name, "sane"))
+ else if (streq (info->name, "sane"))
sane_mode (mode);
- else if (STREQ (info->name, "cbreak"))
+ else if (streq (info->name, "cbreak"))
{
if (reversed)
mode->c_lflag |= ICANON;
else
mode->c_lflag &= ~ICANON;
}
- else if (STREQ (info->name, "pass8"))
+ else if (streq (info->name, "pass8"))
{
if (reversed)
{
mode->c_iflag &= ~ISTRIP;
}
}
- else if (STREQ (info->name, "litout"))
+ else if (streq (info->name, "litout"))
{
if (reversed)
{
mode->c_oflag &= ~OPOST;
}
}
- else if (STREQ (info->name, "raw") || STREQ (info->name, "cooked"))
+ else if (streq (info->name, "raw") || streq (info->name, "cooked"))
{
if ((info->name[0] == 'r' && reversed)
|| (info->name[0] == 'c' && !reversed))
}
}
#ifdef IXANY
- else if (STREQ (info->name, "decctlq"))
+ else if (streq (info->name, "decctlq"))
{
if (reversed)
mode->c_iflag |= IXANY;
}
#endif
#ifdef TABDLY
- else if (STREQ (info->name, "tabs"))
+ else if (streq (info->name, "tabs"))
{
if (reversed)
mode->c_oflag = (mode->c_oflag & ~TABDLY) | TAB3;
}
#else
# ifdef OXTABS
- else if (STREQ (info->name, "tabs"))
+ else if (streq (info->name, "tabs"))
{
if (reversed)
mode->c_oflag = mode->c_oflag | OXTABS;
# endif
#endif
#if defined XCASE && defined IUCLC && defined OLCUC
- else if (STREQ (info->name, "lcase")
- || STREQ (info->name, "LCASE"))
+ else if (streq (info->name, "lcase")
+ || streq (info->name, "LCASE"))
{
if (reversed)
{
}
}
#endif
- else if (STREQ (info->name, "crt"))
+ else if (streq (info->name, "crt"))
mode->c_lflag |= ECHOE
#ifdef ECHOCTL
| ECHOCTL
| ECHOKE
#endif
;
- else if (STREQ (info->name, "dec"))
+ else if (streq (info->name, "dec"))
{
mode->c_cc[VINTR] = 3; /* ^C */
mode->c_cc[VERASE] = 127; /* DEL */
{
unsigned long int value;
- if (STREQ (info->name, "min") || STREQ (info->name, "time"))
+ if (streq (info->name, "min") || streq (info->name, "time"))
value = integer_arg (arg, TYPE_MAXIMUM (cc_t));
else if (arg[0] == '\0' || arg[1] == '\0')
value = to_uchar (arg[0]);
- else if (STREQ (arg, "^-") || STREQ (arg, "undef"))
+ else if (streq (arg, "^-") || streq (arg, "undef"))
value = _POSIX_VDISABLE;
else if (arg[0] == '^' && arg[1] != '\0') /* Ignore any trailing junk. */
{
current_col = 0;
empty_line = true;
- for (i = 0; !STREQ (control_info[i].name, "min"); ++i)
+ for (i = 0; !streq (control_info[i].name, "min"); ++i)
{
if (mode->c_cc[control_info[i].offset] == control_info[i].saneval)
continue;
#ifdef VFLUSHO
/* 'flush' is the deprecated equivalent of 'discard'. */
- if (STREQ (control_info[i].name, "flush"))
+ if (streq (control_info[i].name, "flush"))
continue;
#endif
/* If swtch is the same as susp, don't print both. */
#if VSWTCH == VSUSP
- if (STREQ (control_info[i].name, "swtch"))
+ if (streq (control_info[i].name, "swtch"))
continue;
#endif
/* If eof uses the same slot as min, only print whichever applies. */
#if VEOF == VMIN
if ((mode->c_lflag & ICANON) == 0
- && (STREQ (control_info[i].name, "eof")
- || STREQ (control_info[i].name, "eol")))
+ && (streq (control_info[i].name, "eof")
+ || streq (control_info[i].name, "eol")))
continue;
#endif
putchar ('\n');
current_col = 0;
- for (i = 0; ! STREQ (control_info[i].name, "min"); ++i)
+ for (i = 0; ! streq (control_info[i].name, "min"); ++i)
{
#ifdef VFLUSHO
/* 'flush' is the deprecated equivalent of 'discard'. */
- if (STREQ (control_info[i].name, "flush"))
+ if (streq (control_info[i].name, "flush"))
continue;
#endif
/* If swtch is the same as susp, don't print both. */
#if VSWTCH == VSUSP
- if (STREQ (control_info[i].name, "swtch"))
+ if (streq (control_info[i].name, "swtch"))
continue;
#endif
/* If eof uses the same slot as min, only print whichever applies. */
#if VEOF == VMIN
if ((mode->c_lflag & ICANON) == 0
- && (STREQ (control_info[i].name, "eof")
- || STREQ (control_info[i].name, "eol")))
+ && (streq (control_info[i].name, "eof")
+ || streq (control_info[i].name, "eol")))
continue;
#endif
wrapf ("%s = %s;", control_info[i].name,
else if (c)
{
/* Not a valid number; check for legacy aliases "exta" and "extb" */
- if (STREQ (arg, "exta"))
+ if (streq (arg, "exta"))
return B19200;
- else if (STREQ (arg, "extb"))
+ else if (streq (arg, "extb"))
return B38400;
else
return (speed_t) -1;
for (i = 0; control_info[i].name; ++i)
{
#if VMIN == VEOF
- if (STREQ (control_info[i].name, "min"))
+ if (streq (control_info[i].name, "min"))
break;
#endif
mode->c_cc[control_info[i].offset] = control_info[i].saneval;
return (n <= ULONG_MAX ? n : n % PLURAL_REDUCER + PLURAL_REDUCER);
}
-#define STREQ(a, b) (strcmp (a, b) == 0)
#define STREQ_LEN(a, b, n) (strncmp (a, b, n) == 0) /* n==-1 means unbounded */
#define STRPREFIX(a, b) (strncmp (a, b, strlen (b)) == 0)
char const *node = program;
struct infomap const *map_prog = infomap;
- while (map_prog->program && ! STREQ (program, map_prog->program))
+ while (map_prog->program && ! streq (program, map_prog->program))
map_prog++;
if (map_prog->node)
/* .htaccess on the coreutils web site maps programs to the appropriate page,
however we explicitly handle "[" -> "test" here as the "[" is not
recognized as part of a URL by default in terminals. */
- char const *url_program = STREQ (program, "[") ? "test" : program;
+ char const *url_program = streq (program, "[") ? "test" : program;
printf (_("Full documentation <%s%s>\n"),
PACKAGE_URL, url_program);
printf (_("or available locally via: info '(coreutils) %s%s'\n"),
bool ok;
off_t file_size;
int fd;
- bool is_stdin = STREQ (filename, "-");
+ bool is_stdin = streq (filename, "-");
if (is_stdin)
{
{
struct stat new_stats;
bool ok = false;
- bool is_stdin = (STREQ (f->name, "-"));
+ bool is_stdin = (streq (f->name, "-"));
int prev_errnum = f->errnum;
bool new_file;
int fd = (is_stdin
tailable_stdin (const struct File_spec *f, int n_files)
{
for (int i = 0; i < n_files; i++)
- if (!f[i].ignore && STREQ (f[i].name, "-"))
+ if (!f[i].ignore && streq (f[i].name, "-"))
return true;
return false;
}
/* With N=hundreds of frequently-changing files, this O(N^2)
process might be a problem. FIXME: use a hash table? */
if (f[j].parent_wd == ev->wd
- && STREQ (ev->name, f[j].name + f[j].basename_start))
+ && streq (ev->name, f[j].name + f[j].basename_start))
break;
}
/* Avoid blocking if we may need to process asynchronously. */
bool nonblocking = forever && (nbpids || n_files > 1);
- bool is_stdin = (STREQ (f->name, "-"));
+ bool is_stdin = (streq (f->name, "-"));
if (is_stdin)
{
one file argument. Watch out for "-" and "--", though. */
if (! (argc == 2
|| (argc == 3 && ! (argv[2][0] == '-' && argv[2][1]))
- || (3 <= argc && argc <= 4 && STREQ (argv[2], "--"))))
+ || (3 <= argc && argc <= 4 && streq (argv[2], "--"))))
return false;
int posix_ver = posix2_version ();
for (int i = 0; i < n_files; i++)
{
bool is_a_fifo_or_pipe =
- (STREQ (f[i].name, "-")
+ (streq (f[i].name, "-")
&& !f[i].ignore
&& 0 <= f[i].fd
&& (S_ISFIFO (f[i].mode)
bool found_hyphen = false;
for (int i = 0; i < n_files; i++)
- if (STREQ (file[i], "-"))
+ if (streq (file[i], "-"))
found_hyphen = true;
/* When following by name, there must be a name. */
for (int i = 0; i < n_files; i++)
{
F[i].name = file[i];
- F[i].prettyname = STREQ (file[i], "-") ? _("standard input") : file[i];
+ F[i].prettyname = streq (file[i], "-") ? _("standard input") : file[i];
}
if (header_mode == always
static int
binop (char const *s)
{
- return ( STREQ (s, "=" ) ? EQ_STRING_BINOP
- : STREQ (s, "==" ) ? EQ_STRING_BINOP /* an alias for = */
- : STREQ (s, "!=" ) ? NE_STRING_BINOP
- : STREQ (s, ">" ) ? GT_STRING_BINOP
- : STREQ (s, "<" ) ? LT_STRING_BINOP
- : STREQ (s, "-eq") ? EQ_BINOP
- : STREQ (s, "-ne") ? NE_BINOP
- : STREQ (s, "-lt") ? LT_BINOP
- : STREQ (s, "-le") ? LE_BINOP
- : STREQ (s, "-gt") ? GT_BINOP
- : STREQ (s, "-ge") ? GE_BINOP
- : STREQ (s, "-ot") ? OT_BINOP
- : STREQ (s, "-nt") ? NT_BINOP
- : STREQ (s, "-ef") ? EF_BINOP
+ return ( streq (s, "=" ) ? EQ_STRING_BINOP
+ : streq (s, "==" ) ? EQ_STRING_BINOP /* an alias for = */
+ : streq (s, "!=" ) ? NE_STRING_BINOP
+ : streq (s, ">" ) ? GT_STRING_BINOP
+ : streq (s, "<" ) ? LT_STRING_BINOP
+ : streq (s, "-eq") ? EQ_BINOP
+ : streq (s, "-ne") ? NE_BINOP
+ : streq (s, "-lt") ? LT_BINOP
+ : streq (s, "-le") ? LE_BINOP
+ : streq (s, "-gt") ? GT_BINOP
+ : streq (s, "-ge") ? GE_BINOP
+ : streq (s, "-ot") ? OT_BINOP
+ : streq (s, "-nt") ? NT_BINOP
+ : streq (s, "-ef") ? EF_BINOP
: -1);
}
advance (true);
for (nargs = 1;
- pos + nargs < argc && ! STREQ (argv[pos + nargs], ")");
+ pos + nargs < argc && ! streq (argv[pos + nargs], ")");
nargs++)
if (nargs == 4)
{
}
/* Are there enough arguments left that this could be dyadic? */
- else if (4 <= argc - pos && STREQ (argv[pos], "-l")
+ else if (4 <= argc - pos && streq (argv[pos], "-l")
&& 0 <= (bop = binop (argv[pos + 2])))
value = binary_operator (true, bop);
else if (3 <= argc - pos
op = pos + 1;
/* Is the right integer expression of the form '-l string'? */
- bool r_is_l = op < argc - 2 && STREQ (argv[op + 1], "-l");
+ bool r_is_l = op < argc - 2 && streq (argv[op + 1], "-l");
if (r_is_l)
advance (false);
case EQ_STRING_BINOP:
case NE_STRING_BINOP:
- return STREQ (argv[op - 1], argv[op + 1]) == (bop == EQ_STRING_BINOP);
+ return streq (argv[op - 1], argv[op + 1]) == (bop == EQ_STRING_BINOP);
case GT_STRING_BINOP:
case LT_STRING_BINOP:
while (true)
{
value &= term ();
- if (! (pos < argc && STREQ (argv[pos], "-a")))
+ if (! (pos < argc && streq (argv[pos], "-a")))
return value;
advance (false);
}
while (true)
{
value |= and ();
- if (! (pos < argc && STREQ (argv[pos], "-o")))
+ if (! (pos < argc && streq (argv[pos], "-o")))
return value;
advance (false);
}
{
bool value;
- if (STREQ (argv[pos], "!"))
+ if (streq (argv[pos], "!"))
{
advance (false);
value = ! one_argument ();
if (0 <= bop)
value = binary_operator (false, bop);
- else if (STREQ (argv[pos], "!"))
+ else if (streq (argv[pos], "!"))
{
advance (true);
value = !two_arguments ();
}
- else if (STREQ (argv[pos], "(") && STREQ (argv[pos + 2], ")"))
+ else if (streq (argv[pos], "(") && streq (argv[pos + 2], ")"))
{
advance (false);
value = one_argument ();
advance (false);
}
- else if (STREQ (argv[pos + 1], "-a") || STREQ (argv[pos + 1], "-o")
- || STREQ (argv[pos + 1], ">") || STREQ (argv[pos + 1], "<"))
+ else if (streq (argv[pos + 1], "-a") || streq (argv[pos + 1], "-o")
+ || streq (argv[pos + 1], ">") || streq (argv[pos + 1], "<"))
value = expr ();
else
test_syntax_error (_("%s: binary operator expected"),
break;
case 4:
- if (STREQ (argv[pos], "!"))
+ if (streq (argv[pos], "!"))
{
advance (true);
value = !three_arguments ();
break;
}
- if (STREQ (argv[pos], "(") && STREQ (argv[pos + 3], ")"))
+ if (streq (argv[pos], "(") && streq (argv[pos + 3], ")"))
{
advance (false);
value = two_arguments ();
and "test --version" to exit silently with status 0. */
if (margc == 2)
{
- if (STREQ (margv[1], "--help"))
+ if (streq (margv[1], "--help"))
usage (EXIT_SUCCESS);
- if (STREQ (margv[1], "--version"))
+ if (streq (margv[1], "--version"))
{
version_etc (stdout, PROGRAM_NAME, PACKAGE_NAME, Version, AUTHORS,
(char *) nullptr);
test_main_return (EXIT_SUCCESS);
}
}
- if (margc < 2 || !STREQ (margv[margc - 1], "]"))
+ if (margc < 2 || !streq (margv[margc - 1], "]"))
test_syntax_error (_("missing %s"), quote ("]"));
--margc;
int open_errno = 0;
struct timespec const *t = newtime;
- if (STREQ (file, "-"))
+ if (streq (file, "-"))
fd = STDOUT_FILENO;
else if (! (no_create || no_dereference))
{
edge case where writes fail with GNU specific options. */
atexit (close_stdout);
- if (STREQ (argv[1], "--help"))
+ if (streq (argv[1], "--help"))
usage (EXIT_STATUS);
- if (STREQ (argv[1], "--version"))
+ if (streq (argv[1], "--version"))
version_etc (stdout, PROGRAM_NAME, PACKAGE_NAME, Version, AUTHORS,
(char *) nullptr);
}
{
struct successor *p;
- if (!STREQ (j->str, k->str))
+ if (!streq (j->str, k->str))
{
k->count++;
p = xmalloc (sizeof *p);
struct item *j = nullptr;
struct item *k = nullptr;
token_buffer tokenbuffer;
- bool is_stdin = STREQ (file, "-");
+ bool is_stdin = streq (file, "-");
/* Initialize the head of the tree holding the strings we're sorting. */
struct item *root = new_item (nullptr);
struct linebuffer lb1, lb2;
struct linebuffer *thisline, *prevline;
- if (! (STREQ (infile, "-") || freopen (infile, "r", stdin)))
+ if (! (streq (infile, "-") || freopen (infile, "r", stdin)))
error (EXIT_FAILURE, errno, "%s", quotef (infile));
- if (! (STREQ (outfile, "-") || freopen (outfile, "w", stdout)))
+ if (! (streq (outfile, "-") || freopen (outfile, "w", stdout)))
error (EXIT_FAILURE, errno, "%s", quotef (outfile));
fadvise (stdin, FADVISE_SEQUENTIAL);
static bool
wc_file (char const *file, struct fstatus *fstatus)
{
- if (! file || STREQ (file, "-"))
+ if (! file || streq (file, "-"))
{
have_read_stdin = true;
xset_binary_mode (STDIN_FILENO, O_BINARY);
else
{
for (idx_t i = 0; i < nfiles; i++)
- fstatus[i].failed = (! file[i] || STREQ (file[i], "-")
+ fstatus[i].failed = (! file[i] || streq (file[i], "-")
? fstat (STDIN_FILENO, &fstatus[i].st)
: stat (file[i], &fstatus[i].st));
}
usage (EXIT_FAILURE);
}
- if (STREQ (files_from, "-"))
+ if (streq (files_from, "-"))
stream = stdin;
else
{
for (int i = 0; (file_name = argv_iter (ai, &ai_err)); i++)
{
bool skip_file = false;
- if (files_from && STREQ (files_from, "-") && STREQ (file_name, "-"))
+ if (files_from && streq (files_from, "-") && streq (file_name, "-"))
{
/* Give a better diagnostic in an unusual case:
printf - | wc --files0-from=- */
#include <stdarg.h>
#include <dlfcn.h>
-#define STREQ(a, b) (strcmp (a, b) == 0)
-
int open(const char *path, int flags, ...)
{
static int (*open_func)(const char *, int, ...);
/* Returning ENOENT here will get read_file_system_list()
to fall back to using getmntent() below. */
- if (STREQ (path, "/proc/self/mountinfo"))
+ if (streq (path, "/proc/self/mountinfo"))
{
errno = ENOENT;
return -1;
#include <stdarg.h>
#include <dlfcn.h>
-#define STREQ(a, b) (strcmp (a, b) == 0)
-
int open(const char *path, int flags, ...)
{
static int (*open_func)(const char *, int, ...);
/* Returning ENOENT here will get read_file_system_list()
to fall back to using getmntent() below. */
- if (STREQ (path, "/proc/self/mountinfo"))
+ if (streq (path, "/proc/self/mountinfo"))
{
errno = ENOENT;
return -1;
return open_func(path, flags, mode);
}
-#define STREQ(a, b) (strcmp (a, b) == 0)
-
struct mntent *getmntent (FILE *fp)
{
static char *nonroot_fs;
mntents[done-2].mnt_type = "-";
if (!mntents[done-2].mnt_opts)
mntents[done-2].mnt_opts = "-";
- if (STREQ (mntents[done-2].mnt_dir, "/NONROOT"))
+ if (streq (mntents[done-2].mnt_dir, "/NONROOT"))
mntents[done-2].mnt_dir = nonroot_fs;
- if (STREQ (mntents[done-2].mnt_dir, "/REMOTE"))
+ if (streq (mntents[done-2].mnt_dir, "/REMOTE"))
{
if (!remote_fs || !*remote_fs)
continue;