Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidMorano committed Jun 30, 2024
1 parent 7bd7cc6 commit 3ccfacc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
13 changes: 7 additions & 6 deletions src/testaddrset/memtrack.cc
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ using std::nothrow ; /* constant */
/* external subroutines */


/* external variables */


/* local structures */


Expand Down Expand Up @@ -136,8 +139,7 @@ int memtrack::present(cvoid *addr) noex {
const uintptr_t a = uintptr_t(addr) ;
rs = SR_INVALID ;
if (addr) {
ent e ;
if ((rs = tp->get(a,&e)) >= 0) {
if (ent e{} ; (rs = tp->get(a,&e)) >= 0) {
rs = e.asize ;
}
} /* end if (valid addr) */
Expand All @@ -152,8 +154,7 @@ int memtrack::get(cvoid *addr,memtrack_ent *ep) noex {
const uintptr_t a = uintptr_t(addr) ;
rs = SR_INVALID ;
if (addr) {
ent e ;
if ((rs = tp->get(a,&e)) >= 0) {
if (ent e{} ; (rs = tp->get(a,&e)) >= 0) {
rs = e.asize ;
if (ep) *ep = e ;
}
Expand Down Expand Up @@ -213,7 +214,7 @@ int memtrack::icount() noex {

void memtrack::dtor() noex {
ulogerror("memtrack",SR_BUGCHECK,"dtor called") ;
if (magic) {
if (magic == memtrack_magic) {
cint rs = ifinish() ;
if (rs < 0) {
ulogerror("memtrack",rs,"dtor-finish") ;
Expand All @@ -224,7 +225,7 @@ void memtrack::dtor() noex {

int memtrack_co::operator () (int a) noex {
int rs = SR_BUGCHECK ;
if ((w >= 0) && op) {
if (op && (w >= 0)) {
switch (w) {
case memtrackmem_start:
rs = op->istart(a) ;
Expand Down
6 changes: 3 additions & 3 deletions src/testmapblock/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ INCS=
LIBS= -lmacuser -lu


INCDIR=
INCDIRS=

LIBDIRS= -L$(LIBDIR)


LIBINFO= $(LIBDIRS) $(LIBS)

RUNINFO= -rpath $(RUNDIR)

LIBINFO= $(LIBDIRS) $(LIBS)

# flag setting
CPPFLAGS= $(DEFS) $(INCDIRS) $(MAKECPPFLAGS)
CFLAGS= $(MAKECFLAGS)
Expand Down
2 changes: 2 additions & 0 deletions src/testmapblock/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@
/* Use is subject to license terms. */

#include <envstandards.h> /* ordered first to configure */
#include <unistd.h>
#include <utypedefs.h>
#include <utypealiases.h>
#include <clanguage.h>
#include <cstddef> /* |nullptr_t| */
#include <cstdlib> /* |EXIT_SUCCESS| */
#include <utility> /* |pair(3c++)| */
#include <string>
#include <unordered_map>
#include <iostream>
Expand Down

0 comments on commit 3ccfacc

Please sign in to comment.