Changeset 262 in openpam for trunk/lib/pam_getenvlist.c


Ignore:
Timestamp:
Jun 18, 2003, 11:41:27 AM (18 years ago)
Author:
Dag-Erling Smørgrav
Message:

Avoid side effects in macro arguments (don't I ever learn?); also
address some related style issues.

Submitted by: Dmitry V. Levin <ldv@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/pam_getenvlist.c

    r245 r262  
    3232 * SUCH DAMAGE.
    3333 *
    34  * $P4: //depot/projects/openpam/lib/pam_getenvlist.c#12 $
     34 * $P4: //depot/projects/openpam/lib/pam_getenvlist.c#13 $
    3535 */
    3636
     
    6666        for (i = 0; i < pamh->env_count; ++i) {
    6767                if ((envlist[i] = strdup(pamh->env[i])) == NULL) {
    68                         while (i)
    69                                 FREE(envlist[--i]);
     68                        while (i) {
     69                                --i;
     70                                FREE(envlist[i]);
     71                        }
    7072                        FREE(envlist);
    7173                        openpam_log(PAM_LOG_ERROR, "%s",
Note: See TracChangeset for help on using the changeset viewer.