aboutsummaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
authorSimon Matter <simon.matter@invoca.ch>2011-03-08 07:27:00 +0000
committerDavid Sommerseth <davids@redhat.com>2011-05-10 13:24:51 +0200
commit96ca4f3334b126ad972948d76add176a31116ca4 (patch)
tree8e1c4d50484041f4f59cebaeb9ff6824e00c9570 /plugin
parentFix compile issues when using --enable-small and --disable-ssl/--disable-crypto (diff)
downloadopenvpn-96ca4f3334b126ad972948d76add176a31116ca4.tar.xz
Fix issues with some older GCC compilers
Some older GCC compilers don't like that variables are declared in the middle of the code, and expect them on the top in the block/scope. Trac-ticket: 99 Signed-off-by: Simon Matter <simon.matter@invoca.ch> Acked-by: David Sommerseth <davids@redhat.com> Signed-off-by: David Sommerseth <davids@redhat.com> (cherry picked from commit aa52ca828fc075e010c326e91d2171484a514fde)
Diffstat (limited to 'plugin')
-rw-r--r--plugin/auth-pam/auth-pam.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugin/auth-pam/auth-pam.c b/plugin/auth-pam/auth-pam.c
index 5a8e269..0454ee1 100644
--- a/plugin/auth-pam/auth-pam.c
+++ b/plugin/auth-pam/auth-pam.c
@@ -119,14 +119,14 @@ static void pam_server (int fd, const char *service, int verb, const struct name
static char *
searchandreplace(const char *tosearch, const char *searchfor, const char *replacewith)
{
- if (!tosearch || !searchfor || !replacewith) return 0;
- if (!strlen(tosearch) || !strlen(searchfor) || !strlen(replacewith)) return 0;
-
const char *searching=tosearch;
char *scratch;
char temp[strlen(tosearch)*10];
temp[0]=0;
+ if (!tosearch || !searchfor || !replacewith) return 0;
+ if (!strlen(tosearch) || !strlen(searchfor) || !strlen(replacewith)) return 0;
+
scratch = strstr(searching,searchfor);
if (!scratch) return strdup(tosearch);