benoitc / dnssd_erlang

Erlang interface to Apple's Bonjour DNS Service Discovery implementation
Apache License 2.0
46 stars 16 forks source link

Typos in a couple of conditions #12

Open alco opened 9 years ago

alco commented 9 years ago
c_src/dnssd.c:206:22: warning: comparison of constant 137 with boolean expression is always false [-Wtautological-constant-out-of-range-compare]
    if (!arg.ei_type == ERL_TUPLE || arg.arity != 2) goto badarg;
        ~~~~~~~~~~~~ ^  ~~~~~~~~~
c_src/dnssd.c:235:22: warning: comparison of constant 137 with boolean expression is always false [-Wtautological-constant-out-of-range-compare]
    if (!arg.ei_type == ERL_TUPLE || arg.arity != 3) goto badarg;
        ~~~~~~~~~~~~ ^  ~~~~~~~~~
c_src/dnssd.c:279:22: warning: comparison of constant 137 with boolean expression is always false [-Wtautological-constant-out-of-range-compare]
    if (!arg.ei_type == ERL_TUPLE || arg.arity != 6) goto badarg;
        ~~~~~~~~~~~~ ^  ~~~~~~~~~

I believe you meant to say if (arg.ei_type != ERL_TUPLE ....