com-library/shared/vca_com_ds.c
int vca_com_init_msg(vca_com_msg_hdr * mHdr,
		     vca_com_addr * src,
		     vca_com_addr * dst,
		     unsigned long long length) {
  
  if(!mHdr || !src || !dst || length < 1) {
    return -1;
  }

  if(vca_com_cpy_addr(&mHdr->src, src) 
     && vca_com_cpy_addr(&mHdr->dst, dst)
     && (mHdr->length = length)
     && (mHdr->type = VCA_COM_MSG_SEND) ==  0) {
    return 0;  } else {
    return -1;
  }
}
// sets fields in mHdr to the specified values and performs simple checks
sets fields in mHdr to the specified values and performs simple checks
sets fields in mHdr to the specified values and performs simple checks
int vca_com_init_msg(vca_com_msg_hdr * mHdr,
		     vca_com_addr * src,
		     vca_com_addr * dst,
		     unsigned long long length) {
  if(!mHdr || !src || !dst || length < 1) {
    return -1;
  }
  if(vca_com_cpy_addr(&mHdr->src, src) 
     && vca_com_cpy_addr(&mHdr->dst, dst)
     && (mHdr->length = length)
     && (mHdr->type = VCA_COM_MSG_SEND) ==  0) {
    return 0;  } else {
    return -1;
  }
}
int vca_com_init_msg ( vca_com_msg_hdr * mHdr , vca_com_addr * src , vca_com_addr * dst , unsigned long long length ) { if ( ! mHdr || ! src || ! dst || length < 1 ) { return -1 ; } if ( vca_com_cpy_addr ( & mHdr -> src , src ) && vca_com_cpy_addr ( & mHdr -> dst , dst ) && ( mHdr -> length = length ) && ( mHdr -> type = VCA_COM_MSG_SEND ) == 0 ) { return 0 ; } else { return -1 ; } }
sets fields in mHdr to the specified values and performs simple checks
sets fields in mHdr to the specified values and performs simple checks