summaryrefslogtreecommitdiff
path: root/src/libstddjb/openreadnclose.c
blob: 5f39c43934b06db01c197397a6d4bd50b5bed49c (plain)
1
2
3
4
5
6
7
8
9
/* ISC license. */

#include <skalibs/djbunix.h>

ssize_t openreadnclose (char const *file, char *s, size_t n)
{
  int fd = openbc_read(file) ;
  return fd == -1 ? fd : readnclose(fd, s, n) ;
}