PERFORCE change 100550 for review
Paolo Pisati
piso at FreeBSD.org
Tue Jul 4 08:33:13 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=100550
Change 100550 by piso at piso_newluxor on 2006/07/04 08:32:31
Fixes a bunch of warnings:
-axe empty if statement
-axe unused vars
-include "err.h"
-return 1 if the function is supposed
to return an int
Affected files ...
.. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias.c#4 edit
Differences ...
==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias.c#4 (text+ko) ====
@@ -137,6 +137,7 @@
#include <netinet/libalias/alias_local.h>
#include <netinet/libalias/alias_mod.h>
#else
+#include <err.h>
#include "alias.h"
#include "alias_local.h"
#include "alias_mod.h"
@@ -741,8 +742,6 @@
/* Walk out chain. */
error = find_handler(IN, UDP, la, pip, &ad);
- if (error == EHDNOF)
- ;
/* If UDP checksum is not zero, then adjust since destination port */
/* is being unaliased and destination address is being altered. */
@@ -803,8 +802,6 @@
/* Walk out chain. */
error = find_handler(OUT, UDP, la, pip, &ad);
- if (error == EHDNOF)
- ;
/* If UDP checksum is not zero, adjust since source port is */
/* being aliased and source address is being altered */
@@ -870,8 +867,6 @@
/* Walk out chain. */
error = find_handler(IN, TCP, la, pip, &ad);
- if (error == EHDNOF)
- ;
alias_address = GetAliasAddress(lnk);
original_address = GetOriginalAddress(lnk);
@@ -1031,8 +1026,6 @@
/* Walk out chain. */
error = find_handler(OUT, TCP, la, pip, &ad);
- if (error == EHDNOF)
- ;
/* Adjust TCP checksum since source port is being aliased */
/* and source address is being altered */
@@ -1247,8 +1240,6 @@
/* Walk out chain. */
error = find_handler(IN, IP, la, pip, &ad);
- if (error == EHDNOF)
- ;
if (error == OK)
iresult = PKT_ALIAS_OK;
else
@@ -1374,8 +1365,6 @@
};
/* Walk out chain. */
error = find_handler(OUT, IP, la, pip, &ad);
- if (error == EHDNOF)
- ;
if (error == OK)
iresult = PKT_ALIAS_OK;
else
@@ -1505,8 +1494,6 @@
LibAliasRefreshModules(void) {
char buf[256], conf[] = "/etc/libalias.conf";
FILE *fd;
- struct dll *t;
- struct proto_handler *p;
int len;
fd = fopen(conf, "r");
@@ -1584,6 +1571,7 @@
dlclose(t->handle);
free(t);
}
+ return (1);
}
#endif
More information about the p4-projects
mailing list