Changeset 203 in openpam for trunk/lib/pam_getenv.c


Ignore:
Timestamp:
Feb 8, 2003, 4:41:53 PM (18 years ago)
Author:
Dag-Erling Smørgrav
Message:

Nothing beats being an idiot! Avoid passing expressions with side
effects as arguments to macros. Also impose some sort of consistency
in the naming of variables that hold error codes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/pam_getenv.c

    r194 r203  
    3232 * SUCH DAMAGE.
    3333 *
    34  * $P4: //depot/projects/openpam/lib/pam_getenv.c#10 $
     34 * $P4: //depot/projects/openpam/lib/pam_getenv.c#11 $
    3535 */
    3636
     
    5353        const char *name)
    5454{
     55        char *str;
    5556        int i;
    5657
    57         ENTER();
     58        ENTERS(name);
    5859        if (pamh == NULL)
    5960                RETURNS(NULL);
     
    6263        if ((i = openpam_findenv(pamh, name, strlen(name))) == -1)
    6364                RETURNS(NULL);
    64         RETURNS(strdup(pamh->env[i]));
     65        str = strdup(pamh->env[i]);
     66        RETURNS(str);
    6567}
    6668
Note: See TracChangeset for help on using the changeset viewer.