Browse Source

Clean some useless whitespaces.

1.0.2
Georg Hopp 10 years ago
parent
commit
c4022ee039
  1. 4
      include/tr/memory.h
  2. 6
      src/memory.c

4
include/tr/memory.h

@ -39,11 +39,11 @@ struct memSegment
}; };
/** /**
* I found this at stanford.edu:
* I found this at stanford.edu:
* https://graphics.stanford.edu/~seander/bithacks.html#IntegerLogLookup * https://graphics.stanford.edu/~seander/bithacks.html#IntegerLogLookup
* *
* Really cool way of dealing with this. The oneat stanford.edu is slightly * Really cool way of dealing with this. The oneat stanford.edu is slightly
* different as ist deals only with 32bit values. I need a 64bit version
* different as ist deals only with 32bit values. I need a 64bit version
* because on a 64bit system size_t is also 64bit and thus it is possible * because on a 64bit system size_t is also 64bit and thus it is possible
* to allocate that much amount of memory theoretically. * to allocate that much amount of memory theoretically.
*/ */

6
src/memory.c

@ -196,7 +196,7 @@ TR_malloc(size_t size)
// size if not a multiple of pagesize so bring it to one. // size if not a multiple of pagesize so bring it to one.
idx++; idx++;
size = idx * psize; size = idx * psize;
}
}
idx += psize_width - MIN_BITS; idx += psize_width - MIN_BITS;
} else { } else {
@ -297,11 +297,11 @@ char *
TR_strdup(const char * src) TR_strdup(const char * src)
{ {
char * dup; char * dup;
if (NULL == src) { if (NULL == src) {
return NULL; return NULL;
} }
dup = TR_malloc(strlen(src)+1); dup = TR_malloc(strlen(src)+1);
strcpy(dup, src); strcpy(dup, src);

Loading…
Cancel
Save