X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lib%2Fext2fs%2Funlink.c;h=8ab27ee24da9db7b60be8d3e2d50117ab9154cd9;hb=947315c86645e3ac3e814a49a7e7ab4b3498f64b;hp=ffe8dbe9c835f7e2158f5cd8d8c3652b4295a34b;hpb=efc6f628e15de95bcd13e4f0ee223cb42115d520;p=tools%2Fe2fsprogs.git diff --git a/lib/ext2fs/unlink.c b/lib/ext2fs/unlink.c index ffe8dbe..8ab27ee 100644 --- a/lib/ext2fs/unlink.c +++ b/lib/ext2fs/unlink.c @@ -4,11 +4,12 @@ * Copyright (C) 1993, 1994, 1997 Theodore Ts'o. * * %Begin-Header% - * This file may be redistributed under the terms of the GNU Public - * License. + * This file may be redistributed under the terms of the GNU Library + * General Public License, version 2. * %End-Header% */ +#include "config.h" #include #include #if HAVE_UNISTD_H @@ -43,9 +44,9 @@ static int unlink_proc(struct ext2_dir_entry *dirent, ls->prev = dirent; if (ls->name) { - if ((dirent->name_len & 0xFF) != ls->namelen) + if (ext2fs_dirent_name_len(dirent) != ls->namelen) return 0; - if (strncmp(ls->name, dirent->name, dirent->name_len & 0xFF)) + if (strncmp(ls->name, dirent->name, ext2fs_dirent_name_len(dirent))) return 0; } if (ls->inode) {