1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
Description: Remove unused variables and fix a truncation warn
Author: Francesco Paolo Lovergine <frankie@debian.org>
Forwarded: no
--- a/src/autodir.c
+++ b/src/autodir.c
@@ -194,7 +194,7 @@
{
int pipefd[ 2 ];
char options[ 128 ];
- char our_name[ 128 ];
+ char our_name[ PATH_MAX+1 ];
char dot_path[ PATH_MAX+1 ];
struct stat st;
@@ -300,7 +300,6 @@
/*missing directory handling for autofs mounted directory*/
static void handle_missing( Packet *pkt )
{
- int len;
char mname[ NAME_MAX+1 ]; /*origial requested directory.
could be multi path also*/
char *name = mname; /*requested autofs directory after
@@ -325,7 +324,6 @@
/*copy packet info to local variables
so that it can be freed immediately*/
string_n_copy( mname, pmis->name, sizeof(mname) );
- len = pmis->len;
packet_free( pkt );
if( self.stop )
@@ -429,7 +427,7 @@
static void handle_expire( Packet *pkt )
{
- int len, r;
+ int r;
char name[ NAME_MAX+1 ], *n;
char path[ PATH_MAX+1 ];
struct autofs_packet_expire_multi *exppkt;
@@ -448,7 +446,6 @@
}
string_n_copy( name, exppkt->name, sizeof(name) );
- len = exppkt->len;
packet_free( pkt );
/*unsafe data or black magic? replace*/
--- a/src/lockfile.c
+++ b/src/lockfile.c
@@ -185,7 +185,6 @@
int *exist )
{
unsigned int hash;
- int key;
Lentry *ent, **dptr;
*exist = 0;
@@ -199,7 +198,6 @@
}
hash = string_hash( name );
- key = lentry_key( hash );
string_n_copy( ent->name, name, sizeof(ent->name) );
string_n_copy( ent->path, path, sizeof(ent->path) );
|