Whamcloud - gitweb
libiam: exterminate SET_DEFAULT
authornikita <nikita>
Wed, 23 Aug 2006 22:48:29 +0000 (22:48 +0000)
committernikita <nikita>
Wed, 23 Aug 2006 22:48:29 +0000 (22:48 +0000)
lustre/include/lustre/libiam.h
lustre/utils/libiam.c

index 06c82b8..5196388 100644 (file)
@@ -36,7 +36,6 @@
 #define __IAM_ULIB_H__
 
 
-#define SET_DEFAULT     -1
 #define DX_FMT_NAME_LEN 16
 
 enum iam_fmt_t {
index fc7c773..37f95d6 100644 (file)
@@ -391,35 +391,27 @@ int iam_creat(char *filename, enum iam_fmt_t fmt,
                 return -1;
         }
 
-        if (blocksize == SET_DEFAULT) {
-                blocksize = 4096;
-        } else if (blocksize <= 100) {
+        if (blocksize <= 100) {
                 errno = EINVAL;
                 return -1;
         }
 
-        if (keysize == SET_DEFAULT) {
-                keysize = 8;
-        } else if (keysize < 1) {
+        if (keysize < 1) {
                 errno = EINVAL;
                 return -1;
         }
 
-        if (recsize == SET_DEFAULT) {
-                recsize = 8;
-        } else if (recsize < 0) {
+        if (recsize < 0) {
                 errno = EINVAL;
                 return -1;
         }
 
-        if (ptrsize == SET_DEFAULT) {
-                ptrsize = 4;
-        } else if ((ptrsize != 4) && (ptrsize != 8)) {
+        if (ptrsize != 4 && ptrsize != 8) {
                 errno = EINVAL;
                 return -1;
         }
 
-        if ((keysize + recsize + sizeof(struct iam_leaf_head)) > (blocksize / 3)) {
+        if (keysize + recsize + sizeof(struct iam_leaf_head) > blocksize / 3) {
                 errno = EINVAL;
                 return -1;
         }