Skip to content

Commit 2a74ce6

Browse files
Rename MEM_SIZE to MemorySize
1 parent c03e241 commit 2a74ce6

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

libtrn/edit_dist.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* is at the user's own risk.
66
*/
77

8-
#include "config/common.h" /* Declare MEM_SIZE */
8+
#include "config/common.h" /* Declare MemorySize */
99
#include "trn/edit_dist.h"
1010

1111
#include "trn/util.h" /* Declare safemalloc() */

libtrn/rcln.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ void subartnum(DTASRC *dp, ART_NUM artnum, char *ngnam)
353353
artnum = 0;
354354
}
355355
*(np->rcline + np->numoffset - 1) = np->subscribechar;
356-
mbuf = safemalloc((MEM_SIZE)(curlen+(artnum?(MAX_DIGITS+1)*2+1:1+1)));
356+
mbuf = safemalloc((MemorySize)(curlen+(artnum?(MAX_DIGITS+1)*2+1:1+1)));
357357
*s = '\0';
358358
std::strcpy(mbuf,np->rcline); /* make new rc line */
359359
s = mbuf + (s - np->rcline);

libtrn/terminal.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ void term_set(char *tcbuf)
394394
{
395395
if (tgetflag("nc") && *g_tc_UP)
396396
{
397-
g_tc_CR = safemalloc((MEM_SIZE)std::strlen(g_tc_UP)+2);
397+
g_tc_CR = safemalloc((MemorySize)std::strlen(g_tc_UP)+2);
398398
std::sprintf(g_tc_CR,"%s\r",g_tc_UP);
399399
}
400400
else

util/env.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ char *export_var(const char *nam, const char *val)
496496
{
497497
#ifndef lint
498498
char** tmpenv = (char**) /* point our wand at memory */
499-
safemalloc((MEM_SIZE) (i+2) * sizeof(char*));
499+
safemalloc((MemorySize) (i+2) * sizeof(char*));
500500
#else
501501
char** tmpenv = nullptr;
502502
#endif /* lint */
@@ -512,13 +512,13 @@ char *export_var(const char *nam, const char *val)
512512
else
513513
{
514514
environ = (char**) saferealloc((char*) environ,
515-
(MEM_SIZE) (i+2) * sizeof(char*));
515+
(MemorySize) (i+2) * sizeof(char*));
516516
/* just expand it a bit */
517517
}
518518
#endif /* lint */
519519
environ[i+1] = nullptr; /* make sure it's null terminated */
520520
}
521-
environ[i] = safemalloc((MEM_SIZE)(namlen + std::strlen(val) + 2));
521+
environ[i] = safemalloc((MemorySize)(namlen + std::strlen(val) + 2));
522522
/* this may or may not be in */
523523
/* the old environ structure */
524524
std::sprintf(environ[i],"%s=%s",nam,val);/* all that work just for this */

0 commit comments

Comments
 (0)