Changeset 635 in openpam


Ignore:
Timestamp:
Mar 3, 2013, 11:23:58 PM (8 years ago)
Author:
Dag-Erling Smørgrav
Message:

Simplify by using openpam_straddch(3) to bootstrap the string.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/openpam_readline.c

    r596 r635  
    6363        int ch;
    6464
    65         if ((line = malloc(size = MIN_LINE_LENGTH)) == NULL) {
    66                 openpam_log(PAM_LOG_ERROR, "malloc(): %m");
     65        line = NULL;
     66        if (openpam_straddch(&line, &size, &len, 0) != 0)
    6767                return (NULL);
    68         }
    69         len = 0;
    7068        for (;;) {
    7169                ch = fgetc(f);
Note: See TracChangeset for help on using the changeset viewer.