constify pc_remote and pc_circuit
authorreyk <reyk@openbsd.org>
Tue, 4 Apr 2017 15:50:29 +0000 (15:50 +0000)
committerreyk <reyk@openbsd.org>
Tue, 4 Apr 2017 15:50:29 +0000 (15:50 +0000)
OK rzalamena@

usr.sbin/dhcrelay/dhcpd.h
usr.sbin/dhcrelay/dhcrelay.c

index ca690e3..239f605 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: dhcpd.h,v 1.21 2017/03/16 09:17:20 rzalamena Exp $    */
+/*     $OpenBSD: dhcpd.h,v 1.22 2017/04/04 15:50:29 reyk Exp $ */
 
 /*
  * Copyright (c) 2004 Henning Brauer <henning@openbsd.org>
@@ -56,9 +56,9 @@ struct packet_ctx {
        struct sockaddr_storage          pc_src;
        struct sockaddr_storage          pc_dst;
 
-       u_int8_t                        *pc_circuit;
+       const char                      *pc_circuit;
        int                              pc_circuitlen;
-       u_int8_t                        *pc_remote;
+       const char                      *pc_remote;
        int                              pc_remotelen;
 };
 
index bc2d7d7..161d289 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: dhcrelay.c,v 1.61 2017/03/16 09:17:20 rzalamena Exp $ */
+/*     $OpenBSD: dhcrelay.c,v 1.62 2017/04/04 15:50:29 reyk Exp $ */
 
 /*
  * Copyright (c) 2004 Henning Brauer <henning@cvs.openbsd.org>
@@ -567,7 +567,7 @@ relay_agentinfo(struct packet_ctx *pc, struct interface_info *intf,
                return;
 
        if (rai_remote != NULL) {
-               pc->pc_remote = (u_int8_t *)rai_remote;
+               pc->pc_remote = rai_remote;
                pc->pc_remotelen = strlen(rai_remote);
        } else
                pc->pc_remotelen = 0;
@@ -590,7 +590,7 @@ relay_agentinfo(struct packet_ctx *pc, struct interface_info *intf,
                            sizeof(sin->sin_addr);
                }
        } else {
-               pc->pc_circuit = (u_int8_t *)rai_circuit;
+               pc->pc_circuit = rai_circuit;
                pc->pc_circuitlen = strlen(rai_circuit);
        }
 }