openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/shadow/4.6-r0/shadow-4.6/src/groupmod.c
static void check_new_name(void)
{
    /*
     * Make sure they are actually changing the name.
     */
    if (strcmp(group_name, group_newname) == 0)
    {
        nflg = 0;
        return;
    }

    if (is_valid_group_name(group_newname))
    {

        /*
         * If the entry is found, too bad.
         */
        /* local, no need for xgetgrnam */
        if (prefix_getgrnam(group_newname) != NULL)
        {
            fprintf(stderr, _("%s: group '%s' already exists\n"), Prog,
                    group_newname);
            exit(E_NAME_IN_USE);
        }
        return;
    }

    /*
     * All invalid group names land here.
     */

    fprintf(stderr, _("%s: invalid group name '%s'\n"), Prog, group_newname);
    exit(E_BAD_ARG);
}
/*
 * check_new_name - check the new name for uniqueness
 *
 *	check_new_name() insures that the new name does not exist already.
 *	You can't have the same name twice, period.
 */
check the new name for uniqueness
check_new_name() insures that the new name does not exist already.
You can't have the same name twice, period.
check the new name for uniqueness check_new_name () insures that the new name does not exist already . You can ' t have the same name twice period .
static void check_new_name(void)
{
    if (strcmp(group_name, group_newname) == 0)
    {
        nflg = 0;
        return;
    }
    if (is_valid_group_name(group_newname))
    {
        if (prefix_getgrnam(group_newname) != NULL)
        {
            fprintf(stderr, _("%s: group '%s' already exists\n"), Prog,
                    group_newname);
            exit(E_NAME_IN_USE);
        }
        return;
    }
    fprintf(stderr, _("%s: invalid group name '%s'\n"), Prog, group_newname);
    exit(E_BAD_ARG);
}
static void check_new_name ( void ) { if ( strcmp ( group_name , group_newname ) == 0 ) { nflg = 0 ; return ; } if ( is_valid_group_name ( group_newname ) ) { if ( prefix_getgrnam ( group_newname ) != NULL ) { fprintf ( stderr , _ ( " \n " ) , Prog , group_newname ) ; exit ( E_NAME_IN_USE ) ; } return ; } fprintf ( stderr , _ ( " \n " ) , Prog , group_newname ) ; exit ( E_BAD_ARG ) ; }
check_new_name - check the new name for uniqueness
      check_new_name() insures that the new name does not exist already.
check_new_name - check the new name for uniqueness check_new_name () insures that the new name does not exist already .
/*
     * Make sure they are actually changing the name.
     */ /*
         * If the entry is found, too bad.
         */ /* local, no need for xgetgrnam */ /*
     * All invalid group names land here.
     */