Przeglądaj źródła

rename the 'class' variable -- reserved keyword in c++

Miklos Tirpak 16 lat temu
rodzic
commit
113d899099
2 zmienionych plików z 3 dodań i 3 usunięć
  1. 2 2
      resolve.c
  2. 1 1
      resolve.h

+ 2 - 2
resolve.c

@@ -786,7 +786,7 @@ again:
 			goto error;
 		}
 		rd->type=rtype;
-		rd->class=class;
+		rd->pclass=class;
 		rd->ttl=ttl;
 		rd->next=0;
 		memcpy(rd->name, rec_name, rec_name_len);
@@ -930,7 +930,7 @@ again:
 			goto error;
 		}
 		rd->type=T_CNAME;
-		rd->class=fullname_rd->class;
+		rd->pclass=fullname_rd->pclass;
 		rd->ttl=fullname_rd->ttl;
 		rd->next=head;
 		memcpy(rd->name, name, name_len);

+ 1 - 1
resolve.h

@@ -88,7 +88,7 @@ union dns_query{
 /* rdata struct*/
 struct rdata {
 	unsigned short type;
-	unsigned short class;
+	unsigned short pclass;
 	unsigned int   ttl;
 	void* rdata;
 	struct rdata* next;