]> git.wh0rd.org - dump.git/blobdiff - restore/dirs.c
Relicensed dump/restore under the revised BSD license, as per ftp://ftp.cs.berkeley...
[dump.git] / restore / dirs.c
index bf1583be85fc9c4e79e8e54fe96217c3beb71496..dc45e7c7545b4b140c415f5f3f6f743e6e2bf149 100644 (file)
  * 2. Redistributions in binary form must reproduce the above copyright
  *    notice, this list of conditions and the following disclaimer in the
  *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *     This product includes software developed by the University of
- *     California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
+ * 3. Neither the name of the University nor the names of its contributors
  *    may be used to endorse or promote products derived from this software
  *    without specific prior written permission.
  *
@@ -46,7 +42,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: dirs.c,v 1.20 2002/06/25 19:00:38 stelian Exp $";
+       "$Id: dirs.c,v 1.23 2003/03/30 15:40:38 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
@@ -276,7 +272,7 @@ treescan(char *pname, dump_ino_t ino, long (*todo) __P((char *, dump_ino_t, int)
         * skipping over "." and ".."
         */
        namelen = snprintf(locname, sizeof(locname), "%s/", pname);
-       if (namelen >= sizeof(locname))
+       if (namelen >= (int)sizeof(locname))
                namelen = sizeof(locname) - 1;
        rst_seekdir(dirp, itp->t_seekpt, itp->t_seekpt);
        dp = rst_readdir(dirp); /* "." */
@@ -296,7 +292,7 @@ treescan(char *pname, dump_ino_t ino, long (*todo) __P((char *, dump_ino_t, int)
         */
        while (dp != NULL) {
                locname[namelen] = '\0';
-               if (namelen + dp->d_namlen >= sizeof(locname)) {
+               if (namelen + dp->d_namlen >= (int)sizeof(locname)) {
                        fprintf(stderr, "%s%s: name exceeds %ld char\n",
                                locname, dp->d_name, (long)sizeof(locname) - 1);
                } else {
@@ -381,7 +377,7 @@ putdir(char *buf, size_t size)
                                putent(&cvtbuf);
                        }
        } else {
-               for (loc = 0; loc < size; ) {
+               for (loc = 0; loc < (long)size; ) {
                        dp = (struct direct *)(buf + loc);
 #ifdef DIRDEBUG
                        printf ("reclen = %d, namlen = %d, type = %d\n",
@@ -587,7 +583,7 @@ static long
 rst_telldir(RST_DIR *dirp)
 {
        return ((long)lseek(dirp->dd_fd,
-           (off_t)0, SEEK_CUR) - dirp->dd_size + dirp->dd_loc);
+           (OFF_T)0, SEEK_CUR) - dirp->dd_size + dirp->dd_loc);
 }
 
 /*