******************************************************/
int smbw_ref(int client_fd, Ref_Count_Type type, ...)
{
- va_list ap;
-
/* client id values begin at SMBC_BASE_FC. */
client_fd -= SMBC_BASE_FD;
- va_start(ap, type);
switch(type)
{
case SMBW_RCT_Increment:
return smbw_ref_count[client_fd];
case SMBW_RCT_Set:
- return (smbw_ref_count[client_fd] = va_arg(ap, int));
+ {
+ va_list ap;
+ int ret;
+
+ va_start(ap, type);
+ ret = (smbw_ref_count[client_fd] = va_arg(ap, int));
+ va_end(ap);
+ return ret;
+ }
}
- va_end(ap);
/* never gets here */
return -1;
va_start(ap, comment);
tmp = talloc_vasprintf(context, comment, ap);
+ va_end(ap);
context->results->ui_ops->comment(context, tmp);
va_start(ap, comment);
tmp = talloc_vasprintf(context, comment, ap);
+ va_end(ap);
context->results->ui_ops->warning(context, tmp);
(smb_ucs2_t **)(void *)&pointers[i].data,
s, &n);
if (!ret) {
+ va_end(ap);
return false;
}
pointers[i].length = n;
pointers, (char **)(void *)&pointers[i].data,
s, &n);
if (!ret) {
+ va_end(ap);
return false;
}
pointers[i].length = n;
(smb_ucs2_t **)(void *)&pointers[i].data,
s, &n);
if (!ret) {
+ va_end(ap);
return false;
}
pointers[i].length = n;
/* a helpful macro to avoid running over the end of our blob */
#define NEED_DATA(amount) \
if ((head_ofs + amount) > blob->length) { \
+ va_end(ap); \
return false; \
}
/* Format the query */
if ((p = sqlite3_vmprintf(pSql, args)) == NULL) {
+ va_end(args);
return SQLITE_NOMEM;
}