Make Mac OS X buildbot happy (Missing _U_)
[metze/wireshark/wip.git] / trigcap.c
index 9eef95c84e430db2630b532762db2dd92442f3f6..554418b9ef3009a86c9d5a5769e0bfe783b13301 100644 (file)
--- a/trigcap.c
+++ b/trigcap.c
@@ -4,7 +4,7 @@
  *
  * $Id$
  *
- * (c) 2007, Luis E. Garcia Ontanon <luis.ontanon@gmail.com>
+ * (c) 2007, Luis E. Garcia Ontanon <luis@ontanon.org>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -18,7 +18,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  *
  */
 
@@ -49,12 +49,12 @@ static void panic(int err, const char* fmt, ...) {
 static void dprintf(int lev, const char* fmt, ...) {
        va_list ap;
 
-       va_start(ap,fmt);
        if (lev <= debug_level) {
+               va_start(ap,fmt);
                vfprintf(stderr,fmt,ap);
+               va_end(ap);
                fflush(stderr);
        }
-       va_end(ap);
 }
 
 
@@ -68,7 +68,7 @@ static void usage(int err) {
        "   -p promiscuous mode\n"
        "   -s snapshot length\n"
        "   -q quiet\n"
-       "   -d increase deug level\n"
+       "   -d increase debug level\n"
        "   -h prints this message\n"
        ;
 
@@ -115,7 +115,7 @@ int main(int argc, char** argv) {
        char errbuf[PCAP_ERRBUF_SIZE];
        char* interface = NULL;
        char* outfile = NULL;
-       unsigned snaplen = 65536;
+       guint snaplen = 65536;
        char* start_filter_str = NULL;
        char* stop_filter_str = NULL;
        char* capture_filter_str = NULL;
@@ -172,7 +172,7 @@ int main(int argc, char** argv) {
 
        dprintf(1,"starting with:\n interface: %s\n snaplen: %d\n promisc: %d"
                        "\n outfile: %s\n capture filter: %s\n start: %s\n stop: %s\n debug level: %d\n",
-                       interface ? interface : "to be choosen",
+                       interface ? interface : "to be chosen",
                        snaplen,
                        promisc,
                        outfile ? outfile : "** missing **",