From: krw Date: Mon, 21 Jun 2021 13:17:20 +0000 (+0000) Subject: Wrap #define nitems in #ifndef nitems/#endif. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b68846c9a8090d03b48f9247af40b7b8df10714b;p=openbsd Wrap #define nitems in #ifndef nitems/#endif. While here fix a misplaced '(' to make this nitems the same as all its friends. Pointed out by okan@ --- diff --git a/sbin/fdisk/part.c b/sbin/fdisk/part.c index ac1d2ff8606..a09f84a9223 100644 --- a/sbin/fdisk/part.c +++ b/sbin/fdisk/part.c @@ -1,4 +1,4 @@ -/* $OpenBSD: part.c,v 1.86 2021/06/21 02:05:30 krw Exp $ */ +/* $OpenBSD: part.c,v 1.87 2021/06/21 13:17:20 krw Exp $ */ /* * Copyright (c) 1997 Tobias Weingartner @@ -152,7 +152,9 @@ static const struct protected_guid { { "2e54b353-1271-4842-806f-e436d6af6985" }, /* HiFive BBL */ }; -#define nitems(_a) ((sizeof(_a)) / sizeof((_a)[0])) +#ifndef nitems +#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0])) +#endif int PRT_protected_guid(struct uuid *leuuid)