[BACK]Return to getcap.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libc / gen

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/lib/libc/gen/getcap.c between version 1.52 and 1.53

version 1.52, 2012/06/04 20:56:40 version 1.53, 2014/06/26 20:14:32
Line 254  static int
Line 254  static int
 getent(char **cap, size_t *len, const char * const *db_array, int fd,  getent(char **cap, size_t *len, const char * const *db_array, int fd,
     const char *name, int depth, char *nfield)      const char *name, int depth, char *nfield)
 {  {
 #ifndef SMALL  
         DB *capdbp;  
         char pbuf[MAXPATHLEN];  
         char *cbuf;  
         int retval;  
         size_t clen;  
 #endif  
         char *record, *newrecord;          char *record, *newrecord;
         char *r_end, *rp;       /* pacify gcc */          char *r_end, *rp;       /* pacify gcc */
         const char * const *db_p;          const char * const *db_p;
Line 322  getent(char **cap, size_t *len, const ch
Line 315  getent(char **cap, size_t *len, const ch
                         (void)lseek(fd, (off_t)0, SEEK_SET);                          (void)lseek(fd, (off_t)0, SEEK_SET);
                 } else {                  } else {
 #ifndef SMALL  #ifndef SMALL
                           DB *capdbp;
                           char pbuf[MAXPATHLEN];
                           char *cbuf;
                           int retval;
                           size_t clen;
   
                         (void)snprintf(pbuf, sizeof(pbuf), "%s.db", *db_p);                          (void)snprintf(pbuf, sizeof(pbuf), "%s.db", *db_p);
                         if (expandtc &&                          if ((capdbp = dbopen(pbuf, O_RDONLY, 0, DB_HASH, 0))
                             (capdbp = dbopen(pbuf, O_RDONLY, 0, DB_HASH, 0))  
                              != NULL) {                               != NULL) {
                                 free(record);                                  free(record);
                                 retval = cdbget(capdbp, &record, name);                                  retval = cdbget(capdbp, &record, name);

Legend:
Removed from v.1.52  
changed lines
  Added in v.1.53

CVSweb <webmaster@jp.NetBSD.org>