quota2: direct-code XT_QUOTA_COUNTER_NAME_LENGTH

This commit is contained in:
Jan Engelhardt
2009-07-10 17:21:12 +02:00
parent 1c55aec64a
commit 0d47cb8b37
2 changed files with 2 additions and 4 deletions

View File

@@ -29,7 +29,7 @@ struct xt_quota_counter {
spinlock_t lock; spinlock_t lock;
struct list_head list; struct list_head list;
atomic_t ref; atomic_t ref;
char name[XT_QUOTA_COUNTER_NAME_LENGTH]; char name[sizeof(((struct xt_quota_mtinfo2 *)NULL)->name)];
struct proc_dir_entry *procfs_entry; struct proc_dir_entry *procfs_entry;
}; };

View File

@@ -6,14 +6,12 @@ enum xt_quota_flags {
XT_QUOTA_GROW = 1 << 1, XT_QUOTA_GROW = 1 << 1,
XT_QUOTA_PACKET = 1 << 2, XT_QUOTA_PACKET = 1 << 2,
XT_QUOTA_MASK = 0x7, XT_QUOTA_MASK = 0x7,
XT_QUOTA_COUNTER_NAME_LENGTH = 31,
}; };
struct xt_quota_counter; struct xt_quota_counter;
struct xt_quota_mtinfo2 { struct xt_quota_mtinfo2 {
char name[XT_QUOTA_COUNTER_NAME_LENGTH]; char name[31];
u_int8_t flags; u_int8_t flags;
/* Comparison-invariant */ /* Comparison-invariant */