help-gnats
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

remove unused argument from at-pr


From: Mel Hatzis
Subject: remove unused argument from at-pr
Date: Thu, 31 Oct 2002 14:50:28 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529

I noticed that there was an unused argument in at-pr
and thought I'd provide a patch to get rid of it.

I grokked through all the documentation and verified
that no documentation changes are necessary.

--
Mel Hatzis
Juniper Networks, Inc.
Index: at-pr.sh
===================================================================
RCS file: /cvsroot/gnats/gnats/gnats/at-pr.sh,v
retrieving revision 1.7
diff -u -p -r1.7 at-pr.sh
--- at-pr.sh    4 Aug 2002 10:57:33 -0000       1.7
+++ at-pr.sh    31 Oct 2002 22:45:09 -0000
@@ -26,11 +26,10 @@ USAGE="Usage: $prog [-h|--help] [-d|--da
 
  1 - response time
  2 - PR number
- 3 - path to the PR file (unused)
- 4 - submitter-id
- 5 - full name of the submitter
- 6 - contact for the submitter
- 7 - address for GNATS_ADMIN
+ 3 - submitter-id
+ 4 - full name of the submitter
+ 5 - contact for the submitter
+ 6 - address for GNATS_ADMIN
 "
 
 PATH=/bin:/usr/bin; export PATH
@@ -48,10 +47,10 @@ then
 fi
 
 # process command line options
-while [ $# -gt 7 ]; do
+while [ $# -gt 6 ]; do
   case "$1" in
     -d | --database)
-      if [ $# -eq 8 ]
+      if [ $# -eq 7 ]
       then 
         echo "ERROR: value required for $1 option" >&2
         echo "$USAGE" >&2
@@ -79,7 +78,7 @@ then
     exit 1
 fi
 
-if [ $# != 7 ]; then
+if [ $# != 6 ]; then
   echo "ERROR: $prog called with the incorrect number of arguments" >&2
   echo "$USAGE" >&2
   exit 1
@@ -107,8 +106,8 @@ RESP_ADDR=`$QUERY_PR --responsible-addre
 
 # $DEBUG_MODE is set to 0 when debug is off in the config file
 if [ "x$DEBUG_MODE" = "x1" ]; then
-  STEALTH_HEADER="From: $7 (GNATS Management)
-To: $7
+  STEALTH_HEADER="From: $6 (GNATS Management)
+To: $6
 Subject: mail output from at-pr
 
 
@@ -117,16 +116,16 @@ fi
 
 if [ "$STATE" = "${DEFAULTSTATE}" ]; then
   $LIBEXECDIR/mail-agent << __EOF__
-${STEALTH_HEADER}From: $7 (GNATS Management)
-To: $6, $RESP_ADDR, $7
+${STEALTH_HEADER}From: $6 (GNATS Management)
+To: $5, $RESP_ADDR, $6
 Subject: PR $2 not analyzed in $1 hours
 
 
 PR $2 was not analyzed within the acknowledgment period
 of $1 business hours.  The pertinent information is:
 
- Submitter-Id: $4
- Originator: $5
+ Submitter-Id: $3
+ Originator: $4
  Synopsis: $SYNOPSIS
  Person responsible for the PR: $RESPONSIBLE
 
Index: file-pr.c
===================================================================
RCS file: /cvsroot/gnats/gnats/gnats/file-pr.c,v
retrieving revision 1.49
diff -u -p -r1.49 file-pr.c
--- file-pr.c   28 Oct 2002 22:57:50 -0000      1.49
+++ file-pr.c   31 Oct 2002 22:45:09 -0000
@@ -29,8 +29,7 @@ Software Foundation, 59 Temple Place - S
 static int needs_analysis (PR *pr);
 
 static int run_atpr(PR *pr, AdmEntry *submitter, int submitter_rtime,
-                   struct tm *expired, char *bug_name, char *path,
-                   ErrorDesc *err);
+                   struct tm *expired, char *bug_name, ErrorDesc *err);
 
 static int getBugNumber        (const DatabaseInfo database, ErrorDesc *err);
 static char* derive_submitter  (PR *pr);
@@ -401,7 +400,7 @@ createNewPRFile (PR *pr, int flag_autocr
              && needs_analysis (pr))
            {
              if (run_atpr (pr, submitter, submitter_rtime, expired, bug_name, 
-                           prPath, err) != 0)
+                           err) != 0)
                {
                  bug_number = -1;
                }
@@ -532,8 +531,7 @@ arg_quote (const char *s)
 
 static int
 run_atpr (PR *pr, AdmEntry *submitter, int submitter_rtime, 
-         struct tm *expired, char *bug_name, char *path,
-         ErrorDesc *err)
+         struct tm *expired, char *bug_name, ErrorDesc *err)
 {
   char *at_pr;
   char *command = NULL;
@@ -573,7 +571,7 @@ run_atpr (PR *pr, AdmEntry *submitter, i
       
          fprintf (p, "%s --database %s %d %s %s %s '%s' '%s' '%s'\n", at_pr,
                   databaseName (pr->database),
-                  submitter_rtime, bug_name, path, 
+                  submitter_rtime, bug_name,
                   submitter->admFields[SubmitterAdmKey],
                   orig, cont, pa);
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]