}
 #endif
 
-short_ad *udf_get_fileshortad(uint8_t *ptr, int maxoffset, int *offset,
+short_ad *udf_get_fileshortad(uint8_t *ptr, int maxoffset, uint32_t *offset,
                              int inc)
 {
        short_ad *sa;
                return NULL;
        }
 
-       if ((*offset < 0) || ((*offset + sizeof(short_ad)) > maxoffset))
+       if ((*offset + sizeof(short_ad)) > maxoffset)
                return NULL;
        else {
                sa = (short_ad *)ptr;
        return sa;
 }
 
-long_ad *udf_get_filelongad(uint8_t *ptr, int maxoffset, int *offset, int inc)
+long_ad *udf_get_filelongad(uint8_t *ptr, int maxoffset, uint32_t *offset, int inc)
 {
        long_ad *la;
 
                return NULL;
        }
 
-       if ((*offset < 0) || ((*offset + sizeof(long_ad)) > maxoffset))
+       if ((*offset + sizeof(long_ad)) > maxoffset)
                return NULL;
        else {
                la = (long_ad *)ptr;
 
 static void udf_fill_inode(struct inode *, struct buffer_head *);
 static int udf_alloc_i_data(struct inode *inode, size_t size);
 static struct buffer_head *inode_getblk(struct inode *, sector_t, int *,
-                                       long *, int *);
+                                       sector_t *, int *);
 static int8_t udf_insert_aext(struct inode *, struct extent_position,
                              kernel_lb_addr, uint32_t);
 static void udf_split_extents(struct inode *, int *, int, int,
 {
        int err, new;
        struct buffer_head *bh;
-       unsigned long phys;
+       sector_t phys = 0;
        struct udf_inode_info *iinfo;
 
        if (!create) {
 }
 
 static struct buffer_head *inode_getblk(struct inode *inode, sector_t block,
-                                       int *err, long *phys, int *new)
+                                       int *err, sector_t *phys, int *new)
 {
        static sector_t last_block;
        struct buffer_head *result = NULL;
 
                                                sector_t *);
 extern struct fileIdentDesc *udf_get_fileident(void *buffer, int bufsize,
                                               int *offset);
-extern long_ad *udf_get_filelongad(uint8_t *, int, int *, int);
-extern short_ad *udf_get_fileshortad(uint8_t *, int, int *, int);
+extern long_ad *udf_get_filelongad(uint8_t *, int, uint32_t *, int);
+extern short_ad *udf_get_fileshortad(uint8_t *, int, uint32_t *, int);
 
 /* crc.c */
 extern uint16_t udf_crc(uint8_t *, uint32_t, uint16_t);