aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstddjb/openreadnclose.c
blob: 9492c527e31ab70c62acabc3547b4fdc86f878b4 (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 ? -1 : readnclose(fd, s, n) ;
}