From d905fdaaa7d59abde1535075cca6774fd7f0ef0a Mon Sep 17 00:00:00 2001 From: Amir Goldstein Date: Thu, 4 May 2017 16:26:23 +0300 Subject: xfs: use the common helper uuid_is_null() Use the common helper uuid_is_null() and remove the xfs specific helper uuid_is_nil(). The common helper does not check for the NULL pointer value as xfs helper did, but xfs code never calls the helper with a pointer that can be NULL. Conform comments and warning strings to use the term 'null uuid' instead of 'nil uuid', because this is the terminology used by lib/uuid.c and its users. It is also the terminology used in userspace by libuuid and xfsprogs. Signed-off-by: Amir Goldstein [hch: remove now unused uuid.[ch]] Signed-off-by: Christoph Hellwig Reviewed-by: Brian Foster Reviewed-by: Andy Shevchenko --- fs/xfs/uuid.c | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 fs/xfs/uuid.c (limited to 'fs/xfs/uuid.c') diff --git a/fs/xfs/uuid.c b/fs/xfs/uuid.c deleted file mode 100644 index 737c186ea98b..000000000000 --- a/fs/xfs/uuid.c +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2000-2003,2005 Silicon Graphics, Inc. - * All Rights Reserved. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it would be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ -#include - -int -uuid_is_nil(uuid_t *uuid) -{ - int i; - char *cp = (char *)uuid; - - if (uuid == NULL) - return 0; - /* implied check of version number here... */ - for (i = 0; i < sizeof *uuid; i++) - if (*cp++) return 0; /* not nil */ - return 1; /* is nil */ -} -- cgit v1.2.3