openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/libpam/1.3.1-r0/Linux-PAM-1.3.1/modules/pam_timestamp/pam_timestamp.c
static int format_timestamp_name(char* path, size_t len,
                                 const char* timestamp_dir, const char* tty,
                                 const char* ruser, const char* user)
{
    if (strcmp(ruser, user) == 0)
    {
        return snprintf(path, len, "%s/%s/%s", timestamp_dir, ruser, tty);
    }
    else
    {
        return snprintf(path, len, "%s/%s/%s:%s", timestamp_dir, ruser, tty,
                        user);
    }
}
/* Determine the right path name for a given user's timestamp. */
Determine the right path name for a given user's timestamp.
Determine the right path name for a given user ' s timestamp .
static int format_timestamp_name(char* path, size_t len,
                                 const char* timestamp_dir, const char* tty,
                                 const char* ruser, const char* user)
{
    if (strcmp(ruser, user) == 0)
    {
        return snprintf(path, len, "%s/%s/%s", timestamp_dir, ruser, tty);
    }
    else
    {
        return snprintf(path, len, "%s/%s/%s:%s", timestamp_dir, ruser, tty,
                        user);
    }
}
static int format_timestamp_name ( char * path , size_t len , const char * timestamp_dir , const char * tty , const char * ruser , const char * user ) { if ( strcmp ( ruser , user ) == 0 ) { return snprintf ( path , len , " " , timestamp_dir , ruser , tty ) ; } else { return snprintf ( path , len , " " , timestamp_dir , ruser , tty , user ) ; } }
Determine the right path name for a given user's timestamp.
Determine the right path name for a given user ' s timestamp .