1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

some random changes

This commit is contained in:
Werner Koch 1998-10-25 19:00:01 +00:00
parent e309a875cb
commit 5ccb92591e
32 changed files with 3463 additions and 787 deletions

View file

@ -140,10 +140,11 @@ encode_simple( const char *filename, int mode )
/* setup the inner packet */
if( filename || opt.set_filename ) {
const char *s = opt.set_filename ? opt.set_filename : filename;
char *s = make_basename( opt.set_filename ? opt.set_filename : filename );
pt = m_alloc( sizeof *pt + strlen(s) - 1 );
pt->namelen = strlen(s);
memcpy(pt->name, s, pt->namelen );
m_free(s);
}
else { /* no filename */
pt = m_alloc( sizeof *pt - 1 );
@ -253,10 +254,11 @@ encode_crypt( const char *filename, STRLIST remusr )
/* setup the inner packet */
if( filename || opt.set_filename ) {
const char *s = opt.set_filename ? opt.set_filename : filename;
char *s = make_basename( opt.set_filename ? opt.set_filename : filename );
pt = m_alloc( sizeof *pt + strlen(s) - 1 );
pt->namelen = strlen(s);
memcpy(pt->name, s, pt->namelen );
m_free(s);
}
else { /* no filename */
pt = m_alloc( sizeof *pt - 1 );