diff options
author | Andreas Schneider <asn@samba.org> | 2014-02-15 17:05:18 +0100 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2014-02-19 18:22:29 +0100 |
commit | 3707fba088873988427875c60ae379dc6e218eda (patch) | |
tree | 6f2016284b35b8d3882c54cf5fef284873d9cc40 /source3/client/clitar.c | |
parent | 8524cf69d683107a488945bf39c55ceb57ed19a9 (diff) | |
download | samba-3707fba088873988427875c60ae379dc6e218eda.tar.gz samba-3707fba088873988427875c60ae379dc6e218eda.tar.xz samba-3707fba088873988427875c60ae379dc6e218eda.zip |
s3-clitar: Use ARRAY_SIZE macro.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Diffstat (limited to 'source3/client/clitar.c')
-rw-r--r-- | source3/client/clitar.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/source3/client/clitar.c b/source3/client/clitar.c index 37c31ac3d9e..b8bdbdd1b92 100644 --- a/source3/client/clitar.c +++ b/source3/client/clitar.c @@ -77,9 +77,6 @@ #include <archive.h> #include <archive_entry.h> -/* number of element in an array */ -#define LEN(x) (sizeof(x)/sizeof((x)[0])) - /* prepend module name and line number to debug messages */ #define DBG(a, b) (DEBUG(a, ("tar:%-4d ", __LINE__)), DEBUG(a, b)) @@ -306,14 +303,14 @@ int cmd_tarmode(void) }; while (next_token_talloc(ctx, &cmd_ptr, &buf, NULL)) { - for (i = 0; i < LEN(table); i++) { + for (i = 0; i < ARRAY_SIZE(table); i++) { if (strequal(table[i].cmd, buf)) { *table[i].p = table[i].value; break; } } - if (i == LEN(table)) + if (i == ARRAY_SIZE(table)) DBG(0, ("tarmode: unrecognised option %s\n", buf)); } |