[BACK]Return to mansearch.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Diff for /mandoc/mansearch.c between version 1.29 and 1.30

version 1.29, 2014/04/15 23:48:51 version 1.30, 2014/04/15 23:51:39
Line 210  mansearch(const struct mansearch *search,
Line 210  mansearch(const struct mansearch *search,
          */           */
   
         if (NULL == getcwd(buf, PATH_MAX)) {          if (NULL == getcwd(buf, PATH_MAX)) {
                 perror(NULL);                  perror("getcwd");
                 goto out;                  goto out;
         } else if (-1 == (fd = open(buf, O_RDONLY, 0))) {          } else if (-1 == (fd = open(buf, O_RDONLY, 0))) {
                 perror(buf);                  perror(buf);
Line 218  mansearch(const struct mansearch *search,
Line 218  mansearch(const struct mansearch *search,
         }          }
   
         sql = sql_statement(e);          sql = sql_statement(e);
         printf("%s\n", sql);  
   
         /*          /*
          * Loop over the directories (containing databases) for us to           * Loop over the directories (containing databases) for us to
Line 348  mansearch(const struct mansearch *search,
Line 347  mansearch(const struct mansearch *search,
         }          }
         rc = 1;          rc = 1;
 out:  out:
         exprfree(e);          if (-1 != fd) {
         if (-1 != fd)                  if (-1 == fchdir(fd))
                           perror(buf);
                 close(fd);                  close(fd);
           }
           exprfree(e);
         free(sql);          free(sql);
         *sz = cur;          *sz = cur;
         return(rc);          return(rc);

Legend:
Removed from v.1.29  
changed lines
  Added in v.1.30

CVSweb