Skip to content

Commit

Permalink
Merge branch 'v2.x/staging' into zss-tls1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanfilteau1995 committed Oct 12, 2023
2 parents 101b478 + 4b3aa89 commit 5030262
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
7 changes: 2 additions & 5 deletions c/zos.c
Original file line number Diff line number Diff line change
Expand Up @@ -1500,9 +1500,8 @@ void wtoMessage(const char *message){
}

#define WTO_MAX_SIZE 126
void wtoPrintf3(const char *formatString, ...) {
void wtoPrintf3(const char *formatString, va_list arg) {
char text[WTO_MAX_SIZE+1]; /* Allow for trailing null character */
va_list argPointer;
int cnt;

for (int pass=0; pass<2; pass++){
Expand All @@ -1515,9 +1514,7 @@ void wtoPrintf3(const char *formatString, ...) {
to every successful request.
*/

va_start(argPointer,formatString);
cnt = vsnprintf(text,sizeof(text),formatString,argPointer);
va_end(argPointer);
cnt = vsnprintf(text,sizeof(text),formatString,arg);

if (cnt<0){
if (pass==0)
Expand Down
8 changes: 7 additions & 1 deletion h/zos.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
#ifndef __ZOS__
#define __ZOS__ 1

#ifdef METTLE
#include <metal/stdarg.h>
#else
#include <stdarg.h>
#endif

#ifndef __LONGNAME__

#define extractPSW EXTRPSW
Expand Down Expand Up @@ -1538,7 +1544,7 @@ int dsabIsOMVS(DSAB *dsab);

void wtoMessage(const char *message);

void wtoPrintf3(const char *formatString, ...);
void wtoPrintf3(const char *formatString, va_list arg);

int locate(char *dsn, int *volserCount, char *firstVolser);

Expand Down

0 comments on commit 5030262

Please sign in to comment.