diff --git a/lib/dcerpc.c b/lib/dcerpc.c index df7b8bbb..782b5e05 100644 --- a/lib/dcerpc.c +++ b/lib/dcerpc.c @@ -1761,7 +1761,7 @@ dcerpc_get_error(struct dcerpc_context *dce) void dcerpc_free_data(struct dcerpc_context *dce, void *data) { - return smb2_free_data(dcerpc_get_smb2_context(dce), data); + smb2_free_data(dcerpc_get_smb2_context(dce), data); } int diff --git a/lib/init.c b/lib/init.c index a0c05cde..4b366342 100644 --- a/lib/init.c +++ b/lib/init.c @@ -48,7 +48,7 @@ #include #include -#if !defined(PS2_IOP_PLATFORM) +#ifdef HAVE_TIME_H #include #endif @@ -473,7 +473,7 @@ void smb2_set_security_mode(struct smb2_context *smb2, uint16_t security_mode) smb2->security_mode = security_mode; } -#if !defined(PS2_IOP_PLATFORM) +#ifndef PS2_IOP_PLATFORM static void smb2_set_password_from_file(struct smb2_context *smb2) { char *name = NULL; @@ -549,11 +549,6 @@ static void smb2_set_password_from_file(struct smb2_context *smb2) } fclose(fh); } -#else /* !PS2_IOP_PLATFORM */ -static void smb2_set_password_from_file(struct smb2_context *smb2) -{ - return; -} #endif /* !PS2_IOP_PLATFORM */ void smb2_set_user(struct smb2_context *smb2, const char *user) @@ -566,7 +561,9 @@ void smb2_set_user(struct smb2_context *smb2, const char *user) return; } smb2->user = strdup(user); +#if !defined(PS2_IOP_PLATFORM) smb2_set_password_from_file(smb2); +#endif } void smb2_set_password(struct smb2_context *smb2, const char *password) diff --git a/lib/libsmb2.c b/lib/libsmb2.c index e5a2054a..ee5b6c57 100644 --- a/lib/libsmb2.c +++ b/lib/libsmb2.c @@ -64,7 +64,7 @@ #include #endif -#if defined(HAVE_FCNTL_H) +#ifdef HAVE_FCNTL_H #include #endif @@ -2337,7 +2337,7 @@ smb2_ftruncate_async(struct smb2_context *smb2, struct smb2fh *fh, { struct create_cb_data *create_data; struct smb2_set_info_request req; - struct smb2_file_end_of_file_info eofi; + struct smb2_file_end_of_file_info eofi _U_; struct smb2_pdu *pdu; if (smb2 == NULL) { diff --git a/lib/sync.c b/lib/sync.c index b96be5b6..7c83e8fd 100644 --- a/lib/sync.c +++ b/lib/sync.c @@ -37,7 +37,7 @@ #include -#if defined(HAVE_SYS_POLL_H) +#ifdef HAVE_SYS_POLL_H #include #endif