Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-06-25 14:55:35 +0400
committerDenis Vlasenko <vda.linux@googlemail.com>2007-06-25 14:55:35 +0400
commit80b8b39899a09c7516920cda5fd343b3086d4824 (patch)
treeaa9903fd6b64d19c5f640fa302272d85c92b204e /util-linux/fdisk_sun.c
parent1399282b47bb218132a554cbe5b2b0ce4dcc055f (diff)
Consolidate ARRAY_SIZE macro; remove one unneeded global var (walter harms <wharms@bfs.de>)
Diffstat (limited to 'util-linux/fdisk_sun.c')
-rw-r--r--util-linux/fdisk_sun.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/util-linux/fdisk_sun.c b/util-linux/fdisk_sun.c
index 2fa7b2b86..d4614fd4f 100644
--- a/util-linux/fdisk_sun.c
+++ b/util-linux/fdisk_sun.c
@@ -207,7 +207,7 @@ sun_autoconfigure_scsi(void)
if (!q)
break;
*q = '\0';
- for (i = 0; i < SIZE(sun_drives); i++) {
+ for (i = 0; i < ARRAY_SIZE(sun_drives); i++) {
if (*sun_drives[i].vendor && strcasecmp(sun_drives[i].vendor, vendor))
continue;
if (!strstr(model, sun_drives[i].model))
@@ -244,7 +244,7 @@ create_sunlabel(void)
puts("Drive type\n"
" ? auto configure\n"
" 0 custom (with hardware detected defaults)");
- for (i = 0; i < SIZE(sun_drives); i++) {
+ for (i = 0; i < ARRAY_SIZE(sun_drives); i++) {
printf(" %c %s%s%s\n",
i + 'a', sun_drives[i].vendor,
(*sun_drives[i].vendor) ? " " : "",
@@ -255,11 +255,11 @@ create_sunlabel(void)
if (c == '0') {
break;
}
- if (c >= 'a' && c < 'a' + SIZE(sun_drives)) {
+ if (c >= 'a' && c < 'a' + ARRAY_SIZE(sun_drives)) {
p = sun_drives + c - 'a';
break;
}
- if (c >= 'A' && c < 'A' + SIZE(sun_drives)) {
+ if (c >= 'A' && c < 'A' + ARRAY_SIZE(sun_drives)) {
p = sun_drives + c - 'A';
break;
}
@@ -446,7 +446,7 @@ verify_sun(void)
else
array[i] = -1;
}
- qsort(array,SIZE(array),sizeof(array[0]),
+ qsort(array, ARRAY_SIZE(array), sizeof(array[0]),
(int (*)(const void *,const void *)) verify_sun_cmp);
if (array[0] == -1) {
printf("No partitions defined\n");