Subversion Repositories

?revision_form?Rev ?revision_input??revision_submit??revision_endform?

Rev 5 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5 magnus 1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
## 21_spfquery_infininte_loop.dpatch by Magnus Holmgren <magnus@kibibyte.se>
3
##
4
## All lines beginning with `## DP:' are a description of the patch.
5
## DP: Fix infinite loop in spfquery.c:unimplemented().
6
 
7
@DPATCH@
8
diff -urNad libspf2-1.2.5.dfsg~/src/spfquery/spfquery.c libspf2-1.2.5.dfsg/src/spfquery/spfquery.c
9
--- libspf2-1.2.5.dfsg~/src/spfquery/spfquery.c	2005-02-22 03:36:55.000000000 +0100
10
+++ libspf2-1.2.5.dfsg/src/spfquery/spfquery.c	2007-03-24 22:28:15.000000000 +0100
11
@@ -174,9 +174,7 @@
12
 	struct option	*opt;
13
 	int				 i;
14
 
15
-	i = 0;
16
-	opt = &long_options[i];
17
-	while (opt->name) {
18
+	for (i = 0; (opt = &long_options[i])->name; i++) {
19
 		if (flag == opt->val) {
20
 			fprintf(stderr, "Unimplemented option: -%s or -%c\n",
21
 							opt->name, flag);