[BACK]Return to mansearch.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mandoc

Diff for /src/usr.bin/mandoc/mansearch.c between version 1.48 and 1.49

version 1.48, 2015/11/26 07:41:38 version 1.49, 2016/01/08 15:01:58
Line 119 
Line 119 
                     MAP_SHARED | MAP_ANON, -1, 0);                      MAP_SHARED | MAP_ANON, -1, 0);
   
                 if (MAP_FAILED == pagecache) {                  if (MAP_FAILED == pagecache) {
                         perror("mmap");                          warn("mmap");
                         pagecache = NULL;                          pagecache = NULL;
                         return (int)MANDOCLEVEL_SYSERR;                          return (int)MANDOCLEVEL_SYSERR;
                 }                  }
Line 138 
Line 138 
         }          }
   
         if (-1 == munmap(pagecache, PC_PAGESIZE * PC_NUMPAGES)) {          if (-1 == munmap(pagecache, PC_PAGESIZE * PC_NUMPAGES)) {
                 perror("munmap");                  warn("munmap");
                 pagecache = NULL;                  pagecache = NULL;
                 return (int)MANDOCLEVEL_SYSERR;                  return (int)MANDOCLEVEL_SYSERR;
         }          }
Line 220 
Line 220 
                                 warnx("%s: getcwd: %s", paths->paths[i], buf);                                  warnx("%s: getcwd: %s", paths->paths[i], buf);
                                 continue;                                  continue;
                         } else if (chdir(buf) == -1) {                          } else if (chdir(buf) == -1) {
                                 perror(buf);                                  warn("%s", buf);
                                 continue;                                  continue;
                         }                          }
                 }                  }
                 if (chdir(paths->paths[i]) == -1) {                  if (chdir(paths->paths[i]) == -1) {
                         perror(paths->paths[i]);                          warn("%s", paths->paths[i]);
                         continue;                          continue;
                 }                  }
                 chdir_status = 1;                  chdir_status = 1;
Line 358 
Line 358 
         }          }
         qsort(*res, cur, sizeof(struct manpage), manpage_compare);          qsort(*res, cur, sizeof(struct manpage), manpage_compare);
         if (chdir_status && getcwd_status && chdir(buf) == -1)          if (chdir_status && getcwd_status && chdir(buf) == -1)
                 perror(buf);                  warn("%s", buf);
         exprfree(e);          exprfree(e);
         free(sql);          free(sql);
         *sz = cur;          *sz = cur;

Legend:
Removed from v.1.48  
changed lines
  Added in v.1.49