[CVS] RPM: rpm-5_4: rpm/rpmio/ rpmct.c

2016-04-03 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   04-Apr-2016 05:48:10
  Branch: rpm-5_4  Handle: 2016040403481000

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   rpmct.c

  Log:
- sanity.

  Summary:
RevisionChanges Path
1.1.2.5 +6  -4  rpm/rpmio/rpmct.c
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmct.c
  
  $ cvs diff -u -r1.1.2.4 -r1.1.2.5 rpmct.c
  --- rpm/rpmio/rpmct.c 28 Mar 2016 22:00:12 -  1.1.2.4
  +++ rpm/rpmio/rpmct.c 4 Apr 2016 03:48:10 -   1.1.2.5
  @@ -658,10 +658,12 @@
   }
   
   exit:
  -if (ct->t != NULL)
  - Fts_close(ct->t);
  -ct->t = NULL;
  -ct->p = NULL;
  +if (ct != NULL) {
  + if (ct->t != NULL)
  + Fts_close(ct->t);
  + ct->t = NULL;
  + ct->p = NULL;
  +}
   return rval;
   }
   
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org


[CVS] RPM: rpm-5_4: rpm/rpmio/ rpmct.c

2016-03-28 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   29-Mar-2016 00:00:12
  Branch: rpm-5_4  Handle: 2016032822001200

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   rpmct.c

  Log:
- i18n.

  Summary:
RevisionChanges Path
1.1.2.4 +11 -11 rpm/rpmio/rpmct.c
  

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmct.c
  
  $ cvs diff -u -r1.1.2.3 -r1.1.2.4 rpmct.c
  --- rpm/rpmio/rpmct.c 22 Sep 2014 18:24:27 -  1.1.2.3
  +++ rpm/rpmio/rpmct.c 28 Mar 2016 22:00:12 -  1.1.2.4
  @@ -245,7 +245,7 @@
   #define YESNO "(y/n [n]) "
if (CP_ISSET(NOCLOBBER)) {
if (rpmIsVerbose())
  - rpmlog(RPMLOG_INFO, "%s not overwritten\n", ct->npath);
  + rpmlog(RPMLOG_INFO, _("%s not overwritten\n"), ct->npath);
(void) Fclose(ifd);
return RPMRC_OK;
} else if (CP_ISSET(INTERACTIVE)) {
  @@ -452,7 +452,7 @@
rval = RPMRC_FAIL;
continue;
case FTS_DC:/* Warn, continue. */
  - rpmlog(RPMLOG_ERR, "Fts_read: %s: directory causes a cycle\n", 
ct->p->fts_path);
  + rpmlog(RPMLOG_ERR, _("Fts_read: %s: directory causes a cycle\n"), 
ct->p->fts_path);
rval = RPMRC_FAIL;
continue;
default:
  @@ -500,7 +500,7 @@
*target_mid++ = '/';
*target_mid = 0;
if (target_mid - ct->npath + nlen >= PATH_MAX) {
  - rpmlog(RPMLOG_ERR, "%s%s: name too long (not copied)\n", 
ct->npath, p);
  + rpmlog(RPMLOG_ERR, _("%s%s: name too long (not copied)\n"), 
ct->npath, p);
rval = RPMRC_FAIL;
continue;
}
  @@ -552,7 +552,7 @@
if (ct->sb.st_dev == ct->p->fts_statp->st_dev &&
ct->sb.st_ino == ct->p->fts_statp->st_ino)
{
  - rpmlog(RPMLOG_ERR, "%s and %s are identical (not copied).\n",
  + rpmlog(RPMLOG_ERR, _("%s and %s are identical (not copied).\n"),
ct->npath, ct->p->fts_path);
rval = RPMRC_FAIL;
if (S_ISDIR(ct->p->fts_statp->st_mode))
  @@ -560,7 +560,7 @@
continue;
}
if (!S_ISDIR(ct->p->fts_statp->st_mode) && S_ISDIR(ct->sb.st_mode)) 
{
  - rpmlog(RPMLOG_ERR, "cannot overwrite directory %s with 
non-directory %s\n",
  + rpmlog(RPMLOG_ERR, _("cannot overwrite directory %s with 
non-directory %s\n"),
ct->npath, ct->p->fts_path);
rval = RPMRC_FAIL;
continue;
  @@ -588,7 +588,7 @@
break;
case S_IFDIR:
if (!CP_ISSET(RECURSE)) {
  - rpmlog(RPMLOG_ERR, "%s is a directory (not copied).\n", 
ct->p->fts_path);
  + rpmlog(RPMLOG_ERR, _("%s is a directory (not copied).\n"), 
ct->p->fts_path);
(void)Fts_set(ct->t, ct->p, FTS_SKIP);
badcp = 1;
break;
  @@ -633,7 +633,7 @@
}
break;
case S_IFSOCK:
  - rpmlog(RPMLOG_ERR, "%s is a socket (not copied).\n", 
ct->p->fts_path);
  + rpmlog(RPMLOG_ERR, _("%s is a socket (not copied).\n"), 
ct->p->fts_path);
break;
case S_IFIFO:
if (CP_ISSET(RECURSE)) {
  @@ -882,7 +882,7 @@
   /* Save the target base. */
   {const char * target = ct->av[--ct->ac];
if (strlen(target) > sizeof(ct->npath) - 2) {
  - rpmlog(RPMLOG_ERR, "%s: name too long\n", target);
  + rpmlog(RPMLOG_ERR, _("%s: name too long\n"), target);
goto exit;
}
(void) strcpy(ct->npath, target);
  @@ -923,7 +923,7 @@
   if (r == -1 || !S_ISDIR(ct->sb.st_mode)) {
/* Case (1).  Target is not a directory. */
if (ct->ac > 1) {
  - rpmlog(RPMLOG_ERR, "%s is not a directory\n", ct->npath);
  + rpmlog(RPMLOG_ERR, _("%s is not a directory\n"), ct->npath);
goto exit;
}
   
  @@ -959,9 +959,9 @@
   
if (have_trailing_slash && ct->type == FILE_TO_FILE) {
if (r == -1)
  - rpmlog(RPMLOG_ERR, "directory %s does not exist\n", ct->npath);
  + rpmlog(RPMLOG_ERR, _("directory %s does not exist\n"), 
ct->npath);
else
  - rpmlog(RPMLOG_ERR, "%s is not a directory\n", ct->npath);
  + rpmlog(RPMLOG_ERR, _("%s is not a directory\n"), ct->npath);
goto exit;
}
   } else
  @@ .

[CVS] RPM: rpm-5_4: rpm/rpmio/ rpmct.c

2014-09-12 Thread Jeff Johnson
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  

  Server: rpm5.org Name:   Jeff Johnson
  Root:   /v/rpm/cvs   Email:  j...@rpm5.org
  Module: rpm  Date:   12-Sep-2014 21:52:44
  Branch: rpm-5_4  Handle: 2014091219524300

  Modified files:   (Branch: rpm-5_4)
rpm/rpmio   rpmct.c

  Log:
- rpmct: memory leak.

  Summary:
RevisionChanges Path
1.1.2.2 +2  -2  rpm/rpmio/rpmct.c
  

  patch -p0 '@@ .'
  Index: rpm/rpmio/rpmct.c
  
  $ cvs diff -u -r1.1.2.1 -r1.1.2.2 rpmct.c
  --- rpm/rpmio/rpmct.c 12 Sep 2014 04:38:46 -  1.1.2.1
  +++ rpm/rpmio/rpmct.c 12 Sep 2014 19:52:43 -  1.1.2.2
  @@ -900,8 +900,8 @@
*--ct-p_end = '\0';
   ct-target_end = ct-p_end;
   
  -/* Set end of argument list for fts(3). */
  -ct-av[ct-ac] = NULL;
  +/* Reset end of argument list for fts(3). */
  +ct-av[ct-ac] = _free(ct-av[ct-ac]);
   
   /*
* Cp has two distinct cases:
  @@ .
__
RPM Package Managerhttp://rpm5.org
CVS Sources Repositoryrpm-cvs@rpm5.org