libcli/nbt/dns_hosts_file.c - change "ULONG_MAX" into "UINT32_MAX"
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Tue, 30 Mar 2010 17:08:57 +0000 (19:08 +0200)
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Tue, 30 Mar 2010 17:08:57 +0000 (19:08 +0200)
This fits better since the variable which is tested is of type "uint32_t".

libcli/nbt/dns_hosts_file.c

index 6665a10293d1141bc7509ffe0d6684934bbf5fea..810e4ebb0c91e25fc939a9326713bea5097405ba 100644 (file)
@@ -119,7 +119,7 @@ static bool getdns_hosts_fileent(TALLOC_CTX *ctx, XFILE *fp, char **pp_name, cha
                                continue;
                        }
                        *p_port = strtoul(port, NULL, 10);
-                       if (*p_port == ULONG_MAX) {
+                       if (*p_port == UINT32_MAX) {
                                DEBUG(0, ("getdns_hosts_fileent: Ill formed hosts SRV record [%s] (invalid port: %s)\n",
                                          line, port));
                                continue;