summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/smbconf/smbconf.c24
-rw-r--r--lib/socket_wrapper/socket_wrapper.c8
2 files changed, 4 insertions, 28 deletions
diff --git a/lib/smbconf/smbconf.c b/lib/smbconf/smbconf.c
index f25ccae0d4..80fe9aac37 100644
--- a/lib/smbconf/smbconf.c
+++ b/lib/smbconf/smbconf.c
@@ -226,10 +226,6 @@ WERROR smbconf_set_parameter(struct smbconf_ctx *ctx,
const char *param,
const char *valstr)
{
- if (!smbconf_share_exists(ctx, service)) {
- return WERR_NO_SUCH_SERVICE;
- }
-
return ctx->ops->set_parameter(ctx, service, param, valstr);
}
@@ -265,10 +261,6 @@ WERROR smbconf_get_parameter(struct smbconf_ctx *ctx,
return WERR_INVALID_PARAM;
}
- if (!smbconf_share_exists(ctx, service)) {
- return WERR_NO_SUCH_SERVICE;
- }
-
return ctx->ops->get_parameter(ctx, mem_ctx, service, param, valstr);
}
@@ -299,10 +291,6 @@ WERROR smbconf_get_global_parameter(struct smbconf_ctx *ctx,
WERROR smbconf_delete_parameter(struct smbconf_ctx *ctx,
const char *service, const char *param)
{
- if (!smbconf_share_exists(ctx, service)) {
- return WERR_NO_SUCH_SERVICE;
- }
-
return ctx->ops->delete_parameter(ctx, service, param);
}
@@ -329,10 +317,6 @@ WERROR smbconf_get_includes(struct smbconf_ctx *ctx,
const char *service,
uint32_t *num_includes, char ***includes)
{
- if (!smbconf_share_exists(ctx, service)) {
- return WERR_NO_SUCH_SERVICE;
- }
-
return ctx->ops->get_includes(ctx, mem_ctx, service, num_includes,
includes);
}
@@ -356,10 +340,6 @@ WERROR smbconf_set_includes(struct smbconf_ctx *ctx,
const char *service,
uint32_t num_includes, const char **includes)
{
- if (!smbconf_share_exists(ctx, service)) {
- return WERR_NO_SUCH_SERVICE;
- }
-
return ctx->ops->set_includes(ctx, service, num_includes, includes);
}
@@ -381,10 +361,6 @@ WERROR smbconf_set_global_includes(struct smbconf_ctx *ctx,
WERROR smbconf_delete_includes(struct smbconf_ctx *ctx, const char *service)
{
- if (!smbconf_share_exists(ctx, service)) {
- return WERR_NO_SUCH_SERVICE;
- }
-
return ctx->ops->delete_includes(ctx, service);
}
diff --git a/lib/socket_wrapper/socket_wrapper.c b/lib/socket_wrapper/socket_wrapper.c
index f9ef48e4d6..8ad9e1d93e 100644
--- a/lib/socket_wrapper/socket_wrapper.c
+++ b/lib/socket_wrapper/socket_wrapper.c
@@ -831,11 +831,11 @@ static uint8_t *swrap_packet_init(struct timeval *tval,
size_t icmp_hdr_len = 0;
size_t icmp_truncate_len = 0;
uint8_t protocol = 0, icmp_protocol = 0;
- const struct sockaddr_in *src_in;
- const struct sockaddr_in *dest_in;
+ const struct sockaddr_in *src_in = NULL;
+ const struct sockaddr_in *dest_in = NULL;
#ifdef HAVE_IPV6
- const struct sockaddr_in6 *src_in6;
- const struct sockaddr_in6 *dest_in6;
+ const struct sockaddr_in6 *src_in6 = NULL;
+ const struct sockaddr_in6 *dest_in6 = NULL;
#endif
uint16_t src_port;
uint16_t dest_port;