Revision: 581 http://sourceforge.net/p/vde/svn/581 Author: garden Date: 2014-10-12 20:05:22 +0000 (Sun, 12 Oct 2014) Log Message: ----------- Clean up unused variables.
Modified Paths: -------------- trunk/vde-2/src/common/canonicalize.c trunk/vde-2/src/lib/python/vdeplug_python.c trunk/vde-2/src/slirpvde/tftp.c trunk/vde-2/src/vde_router/vde_router.c trunk/vde-2/src/vde_router/vder_olsr.c trunk/vde-2/src/vde_switch/bitarray.h trunk/vde-2/src/vde_switch/plugins/dump.c Modified: trunk/vde-2/src/common/canonicalize.c =================================================================== --- trunk/vde-2/src/common/canonicalize.c 2014-10-12 19:22:54 UTC (rev 580) +++ trunk/vde-2/src/common/canonicalize.c 2014-10-12 20:05:22 UTC (rev 581) @@ -51,7 +51,6 @@ char *resolved_root = resolved + 1; char *ret_path = NULL; int num_links = 0; - int validstat = 0; struct stat *pst = NULL; if (!name || !resolved) @@ -128,7 +127,6 @@ else if (end - start == 2 && start[0] == '.' && start[1] == '.') { /* Back up to previous component, ignore if at root already. */ - validstat = 0; if (dest > resolved_root) while ((--dest)[-1] != '/'); } @@ -151,7 +149,6 @@ *dest = '\0'; /*check the dir along the path */ - validstat = 1; if (lstat(resolved, pst) < 0) goto abort; else @@ -169,7 +166,6 @@ } /* symlink! */ - validstat = 0; n = readlink (resolved, buf, PATH_MAX); if (n < 0) goto abort; Modified: trunk/vde-2/src/lib/python/vdeplug_python.c =================================================================== --- trunk/vde-2/src/lib/python/vdeplug_python.c 2014-10-12 19:22:54 UTC (rev 580) +++ trunk/vde-2/src/lib/python/vdeplug_python.c 2014-10-12 20:05:22 UTC (rev 581) @@ -16,13 +16,11 @@ struct vde_open_args vde_args = {0,NULL,0777}; char *vde_sock = NULL, *vde_descr = NULL; VDECONN *ret; - int e; if (!PyArg_ParseTuple(args, "ss|isi", &vde_sock, &vde_descr, &vde_args.port, &vde_args.group, &vde_args.mode)) goto failure; ret = vde_open_real(vde_sock, vde_descr, 1, &vde_args); - e = errno; if (!ret) goto failure; else Modified: trunk/vde-2/src/slirpvde/tftp.c =================================================================== --- trunk/vde-2/src/slirpvde/tftp.c 2014-10-12 19:22:54 UTC (rev 580) +++ trunk/vde-2/src/slirpvde/tftp.c 2014-10-12 20:05:22 UTC (rev 581) @@ -161,7 +161,6 @@ struct sockaddr_in saddr, daddr; struct mbuf *m; struct tftp_t *tp; - int nobytes; m = m_get(spt->slirp); @@ -185,8 +184,6 @@ daddr.sin_addr = spt->client_ip; daddr.sin_port = spt->client_port; - nobytes = 2; - m->m_len = sizeof(struct tftp_t) - 514 + 3 + strlen(msg) - sizeof(struct ip) - sizeof(struct udphdr); Modified: trunk/vde-2/src/vde_router/vde_router.c =================================================================== --- trunk/vde-2/src/vde_router/vde_router.c 2014-10-12 19:22:54 UTC (rev 580) +++ trunk/vde-2/src/vde_router/vde_router.c 2014-10-12 20:05:22 UTC (rev 581) @@ -1387,7 +1387,7 @@ char cmd[MAXCMD]; int npfd = 0; struct pollfd pfd[MAXCONN]; - int consoleindex = -1, mgmtindex = -1; + int mgmtindex = -1; int i, n, daemon = 0; char *pidfile = NULL, *configfile = NULL; int option_index; @@ -1459,7 +1459,6 @@ } setsid(); } else { - consoleindex = npfd; pfd[npfd].fd = STDIN_FILENO; pfd[npfd].events = POLLIN | POLLHUP; write(STDOUT_FILENO,header,strlen(header)); Modified: trunk/vde-2/src/vde_router/vder_olsr.c =================================================================== --- trunk/vde-2/src/vde_router/vder_olsr.c 2014-10-12 19:22:54 UTC (rev 580) +++ trunk/vde-2/src/vde_router/vder_olsr.c 2014-10-12 20:05:22 UTC (rev 581) @@ -608,7 +608,6 @@ static void olsr_recv(uint8_t *buffer, int len) { struct olsrmsg *msg; - struct olsr_hmsg_tc *msg_tc; struct olsrhdr *outohdr, *oh = (struct olsrhdr *) buffer; struct olsr_route_entry *ancestor; int parsed = 0; @@ -653,7 +652,6 @@ recv_mid(buffer + parsed + sizeof(struct olsrmsg), ntohs(msg->size) - (sizeof(struct olsrmsg)), origin); break; case OLSRMSG_TC: - msg_tc = (struct olsr_hmsg_tc *) (buffer + parsed); if (reconsider_topology(buffer + parsed + sizeof(struct olsrmsg), ntohs(msg->size) - (sizeof(struct olsrmsg)), origin) < 1) msg->ttl = 0; else { Modified: trunk/vde-2/src/vde_switch/bitarray.h =================================================================== --- trunk/vde-2/src/vde_switch/bitarray.h 2014-10-12 19:22:54 UTC (rev 580) +++ trunk/vde-2/src/vde_switch/bitarray.h 2014-10-12 20:05:22 UTC (rev 581) @@ -142,7 +142,7 @@ for (__i=0; __i< max; __i++) \ for (__v=(X)[__i],__j=0; __j < __VDEWORDSIZE; __v >>=1, __j++) \ if (__v & 1) {(K)=__i*__VDEWORDSIZE+__j;(EXPR);} \ - 0; }) + (K); }) static inline int ba_card(bitarray x,int n) { Modified: trunk/vde-2/src/vde_switch/plugins/dump.c =================================================================== --- trunk/vde-2/src/vde_switch/plugins/dump.c 2014-10-12 19:22:54 UTC (rev 580) +++ trunk/vde-2/src/vde_switch/plugins/dump.c 2014-10-12 20:05:22 UTC (rev 581) @@ -32,11 +32,10 @@ static int dump(char *arg) { int active=atoi(arg); - int rv; if (active) - rv=eventadd(testevent,"packet",dl); + eventadd(testevent,"packet",dl); else - rv=eventdel(testevent,"packet",dl); + eventdel(testevent,"packet",dl); return 0; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://p.sf.net/sfu/Zoho _______________________________________________ vde-users mailing list vde-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vde-users