patch-rocs_impl_mem_c 800 B

123456789101112131415161718192021222324
  1. $OpenBSD: patch-rocs_impl_mem_c,v 1.1 2017/05/07 23:57:16 espie Exp $
  2. Index: rocs/impl/mem.c
  3. --- rocs/impl/mem.c.orig
  4. +++ rocs/impl/mem.c
  5. @@ -53,13 +53,13 @@ static void _mem_init( void ) {
  6. static char __opStr[1024];
  7. static const char* _mem_getLastOperation( void ) {
  8. const char* op = "?";
  9. - if( mt.type = MEMTYPE_ALLOC )
  10. + if( mt.type == MEMTYPE_ALLOC )
  11. op = "alloc";
  12. - else if( mt.type = MEMTYPE_FREE )
  13. + else if( mt.type == MEMTYPE_FREE )
  14. op = "free";
  15. - else if( mt.type = MEMTYPE_CHECK )
  16. + else if( mt.type == MEMTYPE_CHECK )
  17. op = "check";
  18. - else if( mt.type = MEMTYPE_REALLOC )
  19. + else if( mt.type == MEMTYPE_REALLOC )
  20. op = "realloc";
  21. sprintf( __opStr, ">>>>> memLastOp: op=%s p=0x%08X file=%s line=%d <<<<<", op, mt.p, mt.file, mt.line );
  22. return __opStr;