From 9e78ade7d6c596a709d0228909bd5d37a85cf4a5 Mon Sep 17 00:00:00 2001 From: vapier Date: Wed, 13 Dec 2006 22:55:21 +0000 Subject: do not use variable names the same as system functions (like stime() or utime()) --- pan/pan.c | 16 ++++++++-------- pan/tag_report.c | 10 +++++----- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'pan') diff --git a/pan/pan.c b/pan/pan.c index c4b5f7250..78e46e61d 100644 --- a/pan/pan.c +++ b/pan/pan.c @@ -45,7 +45,7 @@ * 01/29/03 - Added: Manoj Iyer, manjo@mail.utexas.edu * - added code supresses test start and test end tags. */ -/* $Id: pan.c,v 1.23 2006/07/10 15:46:10 mreed10 Exp $ */ +/* $Id: pan.c,v 1.24 2006/12/13 22:55:21 vapier Exp $ */ #include #include @@ -81,7 +81,7 @@ struct tag_pgrp { int pgrp; int stopping; - time_t stime; + time_t mystime; struct coll_entry *cmd; char output[PATH_MAX]; }; @@ -699,8 +699,8 @@ check_pids(struct tag_pgrp *running, int *num_active, int keep_active, if (!fmt_print) fprintf(logfile, "tag=%s stime=%d dur=%d exit=%s stat=%d core=%s cu=%d cs=%d\n", - running[i].cmd->name, (int) (running[i].stime), - (int) (t - running[i].stime), status, w, + running[i].cmd->name, (int) (running[i].mystime), + (int) (t - running[i].mystime), status, w, (stat_loc & 0200) ? "yes" : "no", (int) (tms2.tms_cutime - tms1.tms_cutime), (int) (tms2.tms_cstime - tms1.tms_cstime)); @@ -893,7 +893,7 @@ run_child(struct coll_entry *colle, struct tag_pgrp *active, int quiet_mode) if (colle->pcnt_f) free(c_cmdline); close(errpipe[1]); - time(&active->stime); + time(&active->mystime); active->cmd = colle; /* if the child couldn't go through with the exec, @@ -955,7 +955,7 @@ run_child(struct coll_entry *colle, struct tag_pgrp *active, int quiet_mode) if (Debug & Dstartup) fprintf(stderr, "started %s cpid=%d at %s", - colle->name, cpid, ctime(&active->stime)); + colle->name, cpid, ctime(&active->mystime)); if (Debug & Dstart) { fprintf(stderr, "Executing test = %s as %s", colle->name, colle->cmdline); @@ -1184,7 +1184,7 @@ write_test_start(struct tag_pgrp *running, const char *init_status) printf("%s\ntag=%s stime=%ld\ncmdline=\"%s\"\ncontacts=\"%s\"\nanalysis=%s\ninitiation_status=\"%s\"\n%s\n", "<<>>", - running->cmd->name, running->stime, running->cmd->cmdline, "", + running->cmd->name, running->mystime, running->cmd->cmdline, "", "exit", init_status, "<<>>"); } @@ -1200,7 +1200,7 @@ write_test_end(struct tag_pgrp *running, time_t exit_time, if (!strcmp(reporttype, "rts")) { printf("%s\nduration=%ld termination_type=%s termination_id=%d corefile=%s\ncutime=%d cstime=%d\n%s\n", "<<>>", - (long) (exit_time - running->stime), + (long) (exit_time - running->mystime), term_type, term_id, (stat_loc & 0200) ? "yes" : "no", (int) (tms2->tms_cutime - tms1->tms_cutime), (int) (tms2->tms_cstime - tms1->tms_cstime), diff --git a/pan/tag_report.c b/pan/tag_report.c index de4515c60..0389e715d 100644 --- a/pan/tag_report.c +++ b/pan/tag_report.c @@ -30,7 +30,7 @@ * http://oss.sgi.com/projects/GenInfo/NoticeExplan/ * */ -/* $Id: tag_report.c,v 1.1 2000/09/21 21:35:06 alaffin Exp $ */ +/* $Id: tag_report.c,v 1.2 2006/12/13 22:55:22 vapier Exp $ */ #include "tag_report.h" #include "debug.h" #include "reporter.h" @@ -239,7 +239,7 @@ tag_report(alltags, ctag, keys) /* retrieved _keys values: initation status, start time, duration, * termination type, termination id, start line, end line. */ - char *tag, *contact, *is, *stime, *duration, *tt, *ti, *sl, *el; + char *tag, *contact, *is, *mystime, *duration, *tt, *ti, *sl, *el; /* Check all driver-level status first */ strcpy(key_get, "tag"); @@ -361,12 +361,12 @@ tag_report(alltags, ctag, keys) } strcpy(key_get, "stime"); - if((stime = (char *)sym_get(keys, key_get)) == NULL) { - stime = "No_stime"; + if((mystime = (char *)sym_get(keys, key_get)) == NULL) { + mystime = "No_stime"; } printf("%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t\n", - tag, "!", "!", is, contact, stime, duration, + tag, "!", "!", is, contact, mystime, duration, ti, tt, sl, el); } -- cgit v1.2.3