mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
cleanup: don't hardcode array length
Move the ARRAY_SIZE macro into a header file and use it to determine the number of cloud servers that we need to check. Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
9620d11828
commit
194fe28d50
3 changed files with 3 additions and 3 deletions
|
@ -15,12 +15,13 @@ extern "C" {
|
|||
#include <stdbool.h>
|
||||
#endif
|
||||
|
||||
#define CLOUD_NUM_HOSTS 2
|
||||
#define CLOUD_HOST_US "ssrf-cloud-us.subsurface-divelog.org"
|
||||
#define CLOUD_HOST_EU "ssrf-cloud-eu.subsurface-divelog.org"
|
||||
#define CLOUD_HOST_PATTERN "ssrf-cloud-..\\.subsurface-divelog\\.org"
|
||||
#define CLOUD_HOST_GENERIC "cloud.subsurface-divelog.org"
|
||||
|
||||
#define ARRAY_SIZE(array) (sizeof(array)/sizeof(array[0]))
|
||||
|
||||
enum remote_transport { RT_OTHER, RT_HTTPS, RT_SSH };
|
||||
|
||||
struct git_oid;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue