diff options
author | Gregory Mullen (GrayHatter) <greg@grayhatter.com> | 2016-02-13 20:44:30 -0800 |
---|---|---|
committer | Gregory Mullen (GrayHatter) <greg@grayhatter.com> | 2016-02-13 20:44:30 -0800 |
commit | 96bf594be5bd3524d5fb437be1444f9772bea827 (patch) | |
tree | 9feb3d1242645d0e415933eb2e97029bb847b0fa /toxav/toxav.c | |
parent | 2d361228cd3c63bdbcc3bde6123321b3a61a6362 (diff) |
update the compatablity function to match the macro
Diffstat (limited to 'toxav/toxav.c')
-rw-r--r-- | toxav/toxav.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/toxav/toxav.c b/toxav/toxav.c index 4c2cb4ef..7a883cf2 100644 --- a/toxav/toxav.c +++ b/toxav/toxav.c | |||
@@ -121,10 +121,11 @@ uint32_t toxav_version_patch(void) | |||
121 | 121 | ||
122 | bool toxav_version_is_compatible(uint32_t major, uint32_t minor, uint32_t patch) | 122 | bool toxav_version_is_compatible(uint32_t major, uint32_t minor, uint32_t patch) |
123 | { | 123 | { |
124 | if (major != TOXAV_VERSION_MAJOR) | 124 | return (TOXAV_VERSION_MAJOR == major && /* Force the major version */ |
125 | return 0; | 125 | (TOXAV_VERSION_MINOR > minor || /* Current minor version must be newer than requested -- or -- */ |
126 | else | 126 | (TOXAV_VERSION_MINOR == minor && TOX_VERSION_PATCH >= patch) /* the patch must be the same or newer */ |
127 | return 1; | 127 | ) |
128 | ) | ||
128 | } | 129 | } |
129 | 130 | ||
130 | ToxAV *toxav_new(Tox *tox, TOXAV_ERR_NEW *error) | 131 | ToxAV *toxav_new(Tox *tox, TOXAV_ERR_NEW *error) |