char * tmpdir;
root = (dbi->dbi_root ? dbi->dbi_root : rpmdb->db_root);
- if ((root[0] == '/' && root[1] == '\0') || rpmdb->db_chrootDone)
+ if (rstreq(root, "/") || rpmdb->db_chrootDone)
root = NULL;
tmpdir = rpmGenPath(root, dbi->dbi_tmpdir, NULL);
xx = dbenv->set_tmp_dir(dbenv, tmpdir);
* Get the prefix/root component and directory path.
*/
root = (dbi->dbi_root ? dbi->dbi_root : rpmdb->db_root);
- if ((root[0] == '/' && root[1] == '\0') || rpmdb->db_chrootDone)
+ if (rstreq(root, "/") || rpmdb->db_chrootDone)
root = NULL;
home = (dbi->dbi_home ? dbi->dbi_home : rpmdb->db_home);
* Get the prefix/root component and directory path.
*/
root = (dbi->dbi_root ? dbi->dbi_root : rpmdb->db_root);
- if ((root[0] == '/' && root[1] == '\0') || rpmdb->db_chrootDone)
+ if (rstreq(root, "/") || rpmdb->db_chrootDone)
root = NULL;
home = (dbi->dbi_home ? dbi->dbi_home : rpmdb->db_home);
{
int xx;
- if ((dbi->dbi_root[0] == '/' && dbi->dbi_root[1] == '\0') || dbi->dbi_rpmdb->db_chrootDone || sqlInRoot)
+ if (rstreq(dbi->dbi_root, "/") || dbi->dbi_rpmdb->db_chrootDone || sqlInRoot)
/* Nothing to do, was not already in chroot */
return;
{
int xx;
- if ((dbi->dbi_root[0] == '/' && dbi->dbi_root[1] == '\0') || dbi->dbi_rpmdb->db_chrootDone || !sqlInRoot)
+ if (rstreq(dbi->dbi_root, "/") || dbi->dbi_rpmdb->db_chrootDone || !sqlInRoot)
/* Nothing to do, not in chroot */
return;