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

#include <skalibs/djbunix.h>

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