SvGROW(sv, len + 1); /* so try to pre-extend */
mark = oldmark;
- items = sp - mark;;
+ items = sp - mark;
++mark;
}
if (p = argv[1]) {
name = (char *) malloc((n = strlen(p)) + 5);
+ if (!name)
+ oops("cannot get memory");
+
strcpy(name, p);
strcpy(name + n, ".pag");
if (p = argv[1]) {
name = (char *) malloc((n = strlen(p)) + 5);
+ if (!name)
+ oops("cannot get memory");
+
strcpy(name, p);
strcpy(name + n, ".pag");
db.dsize = 0;
db.dptr = (char *) malloc(strlen(s) * sizeof(char));
+ if (!db.dptr)
+ oops("cannot get memory");
+
for (p = db.dptr; *s != '\0'; p++, db.dsize++, s++) {
if (*s == '\\') {
if (*++s == 'n')
char *p1, *p2;
buf = (char *) malloc((db.dsize + 1) * sizeof(char));
+ if (!buf)
+ oops("cannot get memory");
for (p1 = buf, p2 = db.dptr; *p2 != '\0'; *p1++ = *p2++);
*p1 = '\0';
return buf;
}
}
- if (giveusage | what == YOW | argn < 1) {
+ if (giveusage || what == YOW || argn < 1) {
fprintf(stderr, "Usage: %s databse [-m r|w|rw] [-crtx] -a|-d|-f|-F|-s [key [content]]\n", argv[0]);
exit(-1);
}
if (!p) return;
len = strlen(p);
tpath = (char *)malloc(len + strlen(TMPPATH1) + 2);
- strcpy(tpath, p);
- tpath[len] = '/';
- strcpy(tpath + len + 1, TMPPATH1);
- tmppath = tpath;
+ if (tpath) {
+ strcpy(tpath, p);
+ tpath[len] = '/';
+ strcpy(tpath + len + 1, TMPPATH1);
+ tmppath = tpath;
+ }
}
#include "XSUB.h"
=item no UTC offset information; assuming local time is UTC
-(S) A warning peculiar to VMS. Per was unable to find the local
-timezone offset, so it's assuming that local system time is equivalent
-to UTC. If it's not, define the logical name F<SYS$TIMEZONE_DIFFERENTIAL>
-to translate to the number of seconds which need to be added to UTC to
-get local time.
-
-=item no UTC offset information; assuming local time is UTC
-
-(S) A warning peculiar to VMS. Per was unable to find the local
+(S) A warning peculiar to VMS. Perl was unable to find the local
timezone offset, so it's assuming that local system time is equivalent
to UTC. If it's not, define the logical name F<SYS$TIMEZONE_DIFFERENTIAL>
to translate to the number of seconds which need to be added to UTC to
{
char buf[1 + sizeof(UV)];
char *in = buf + sizeof(buf);
- UV auv = U_V(adouble);;
+ UV auv = U_V(adouble);
do {
*--in = (auv & 0x7f) | 0x80;
}
if (0 == dwLen) {
sMsg = (char*)LocalAlloc(0, 64/**sizeof(TCHAR)*/);
- dwLen = sprintf(sMsg,
- "Unknown error #0x%lX (lookup 0x%lX)",
- dwErr, GetLastError());
+ if (sMsg)
+ dwLen = sprintf(sMsg,
+ "Unknown error #0x%lX (lookup 0x%lX)",
+ dwErr, GetLastError());
}
};
virtual void FreeBuf(char* sMsg)
}
if (0 == dwLen) {
sMsg = (char*)LocalAlloc(0, 64/**sizeof(TCHAR)*/);
- dwLen = sprintf(sMsg,
- "Unknown error #0x%lX (lookup 0x%lX)",
- dwErr, GetLastError());
+ if (sMsg)
+ dwLen = sprintf(sMsg,
+ "Unknown error #0x%lX (lookup 0x%lX)",
+ dwErr, GetLastError());
+ }
+ if (sMsg) {
+ sv_setpvn((SV*)sv, sMsg, dwLen);
+ LocalFree(sMsg);
}
- sv_setpvn((SV*)sv, sMsg, dwLen);
- LocalFree(sMsg);
}
if (len > 0)
tmpstr = walk(1,level,ops[node+1].ival,&numarg,P_MIN);
else
- tmpstr = str_new(0);;
+ tmpstr = str_new(0);
if (!tmpstr->str_ptr || !*tmpstr->str_ptr) {
if (lval_field) {
t = saw_OFS ? "$," : "' '";
str_scat(str,fstr=walk(1,level,ops[node+1].ival,&numarg,P_MIN));
str_free(fstr);
if (str->str_ptr[str->str_cur - 1] == '\n')
- --str->str_cur;;
+ --str->str_cur;
str_cat(str," while (");
str_scat(str,fstr=walk(0,level,ops[node+2].ival,&numarg,P_MIN));
str_free(fstr);