Formatting and debugs

This commit is contained in:
Olof hagsand 2024-05-28 18:50:07 +02:00
parent c377a28d56
commit e2140aed10
7 changed files with 14 additions and 8 deletions

View file

@ -2245,8 +2245,10 @@ clixon_compare_xmls(cxobj *xc1,
clixon_err(OE_UNDEF, errno, "tmpfile");
goto done;
}
if ((f = fdopen(fd, "w")) == NULL)
if ((f = fdopen(fd, "w")) == NULL){
clixon_err(OE_XML, errno, "fdopen(%s)", filename1);
goto done;
}
switch(format){
case FORMAT_TEXT:
if (clixon_text2file(f, xc1, 0, cligen_output, 1, 1) < 0)
@ -2260,14 +2262,14 @@ clixon_compare_xmls(cxobj *xc1,
}
fclose(f);
close(fd);
if ((fd = mkstemp(filename2)) < 0){
clixon_err(OE_UNDEF, errno, "mkstemp: %s", strerror(errno));
goto done;
}
if ((f = fdopen(fd, "w")) == NULL)
if ((f = fdopen(fd, "w")) == NULL){
clixon_err(OE_XML, errno, "fdopen(%s)", filename2);
goto done;
}
switch(format){
case FORMAT_TEXT:
if (clixon_text2file(f, xc2, 0, cligen_output, 1, 1) < 0)