]> git.bitcoin.ninja Git - tunudptotcp/commitdiff
Correct return type check
authorMatt Corallo <git@bluematt.me>
Tue, 15 Mar 2022 02:46:53 +0000 (02:46 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 15 Mar 2022 02:46:53 +0000 (02:46 +0000)
main.cpp

index 332229836627b80df7cd26d6151ce1cac179ebb9..9f0173f3bb5e125ddfe040fa5537957ec46afd0f 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -581,7 +581,7 @@ int main(int argc, char* argv[]) {
        // Create tun and bind to sockets...
        //
 
-       if (tun_alloc(tun_name, TUN_IF_COUNT, fd) < 0) {
+       if (tun_alloc(tun_name, TUN_IF_COUNT, fd) != 0) {
                fprintf(stderr, "Failed to alloc tun if\n");
                return -1;
        }