/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to plugins.d/askpass-fifo.c

merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 * along with this program.  If not, see
20
20
 * <http://www.gnu.org/licenses/>.
21
21
 * 
22
 
 * Contact the authors at <https://www.fukt.bsnet.se/~belorn/> and
23
 
 * <https://www.fukt.bsnet.se/~teddy/>.
 
22
 * Contact the authors at <mandos@fukt.bsnet.se>.
24
23
 */
25
24
 
26
25
#define _GNU_SOURCE             /* TEMP_FAILURE_RETRY() */
62
61
  {
63
62
    size_t buf_allocated = 0;
64
63
    const size_t blocksize = 1024;
65
 
    do{
 
64
    do {
66
65
      if(buf_len + blocksize > buf_allocated){
67
66
        char *tmp = realloc(buf, buf_allocated + blocksize);
68
67
        if(tmp == NULL){
81
80
        return EXIT_FAILURE;
82
81
      }
83
82
      buf_len += (size_t)sret;
84
 
    }while(sret != 0);
 
83
    } while(sret != 0);
85
84
  }
86
85
  
87
86
  /* Close FIFO */