c987560802
```sh git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" | while read template; do for p in ${template%/template}/patches/*; do sed -i ' \,^[+-][+-][+-] /dev/null,b /^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b s,^[*][*][*] ,&a/, /^--- /{ s,\(^--- \)\(./\)*,\1a/, s,[.][Oo][Rr][Ii][Gg]\([ /]\),\1, s/[.][Oo][Rr][Ii][Gg]$// s/[.]patched[.]\([^.]\)/.\1/ h } /^+++ -/{ g s/^--- a/+++ b/ b } s,\(^+++ \)\(./\)*,\1b/, ' "$p" done sed -i '/^patch_args=/d' $template done ```
12 lines
404 B
Diff
12 lines
404 B
Diff
Use INADDR_NONE instead of -1 to check inet_addr() result
|
|
--- a/cbtcommon/tcpsocket.c.1 2013-04-14 13:21:14.848464155 +0400
|
|
+++ b/cbtcommon/tcpsocket.c 2013-04-14 13:23:23.015136709 +0400
|
|
@@ -198,7 +198,7 @@
|
|
memcpy(dest, &ip.s_addr, sizeof(ip.s_addr));
|
|
}
|
|
#else
|
|
- if ( (*dest = inet_addr(addr_str)) != -1)
|
|
+ if ( (*dest = inet_addr(addr_str)) != INADDR_NONE)
|
|
{
|
|
/* nothing */
|
|
}
|