]> git.ipfire.org Git - thirdparty/ulogd2.git/commitdiff
fix bug in ulog_test.c
authorlaforge <laforge>
Thu, 13 Jun 2002 12:56:53 +0000 (12:56 +0000)
committerlaforge <laforge>
Thu, 13 Jun 2002 12:56:53 +0000 (12:56 +0000)
libipulog/Makefile
libipulog/ulog_test.c

index ea6b27a9e962f15209d262a464f516dfe58fb813..55c191decda767b604710a18b58177b77a2c993d 100644 (file)
@@ -1,14 +1,24 @@
-CC = gcc
-CFLAGS = -I./include # -g
+# Generated automatically from Makefile.in by configure.
+#
+
+include ../Rules.make
+CFLAGS+=-Iinclude -I/usr/src/linux/include
+
+libipulog.a: libipulog.o
+       ld -i $< -o $@
+
+distrib:
 
 ulog_test: ulog_test.c libipulog.a
        $(CC) $(CFLAGS) ulog_test.c libipulog.a -o ulog_test
 
 libipulog.o: libipulog.c
-       $(CC) $(CFLAGS) -c libipulog.c -o libipulog.o
-
-libipulog.a: libipulog.o
-       ld -i libipulog.o -o libipulog.a
+       $(CC) $(CFLAGS) -c $< -o $@
 
 clean:
        rm -f ulog_test libipulog.o libipulog.a
+
+distclean: clean
+       rm Makefile
+
+install: libipulog.a
index c9ef9b729d11a80bca5d0d1f6581fd1e21f69fe9..c891764cda4f5fa508a3deb744ca015ba9aa1bb5 100644 (file)
@@ -1,4 +1,4 @@
-/* ulog_test, $Revision: 1.3 $
+/* ulog_test, $Revision: 1.4 $
  *
  * small testing program for libipulog, part of the netfilter ULOG target
  * for the linux 2.4 netfilter subsystem.
@@ -7,7 +7,7 @@
  *
  * this code is released under the terms of GNU GPL
  *
- * $Id: ulog_test.c,v 1.3 2000/09/22 06:57:16 laforge Exp $
+ * $Id: ulog_test.c,v 1.4 2001/01/30 09:28:04 laforge Exp $
  */
 
 #include <stdio.h>
@@ -68,7 +68,7 @@ int main(int argc, char *argv[])
        /* loop receiving packets and handling them over to handle_packet */
        for (i = 0; i < atoi(argv[1]); i++) {
                len = ipulog_read(h, buf, MYBUFSIZ, 1);
-               if (len < 0) {
+               if (len <= 0) {
                        ipulog_perror("ulog_test: short read");
                        exit(1);
                }