@@ -1022,10 +1022,10 @@ void _nvp_SHM_COPY() {
10221022 int i ,j ;
10231023 unsigned long offset_in_map = 0 ;
10241024 int pid = getpid ();
1025- char buf [BUF_SIZE ];
1025+ char exec_nvp_filename [BUF_SIZE ];
10261026
1027- sprintf (buf , "exec-ledger-%d" , pid );
1028- exec_ledger_fd = shm_open (buf , O_RDONLY , 0666 );
1027+ sprintf (exec_nvp_filename , "exec-ledger-%d" , pid );
1028+ exec_ledger_fd = shm_open (exec_nvp_filename , O_RDONLY , 0666 );
10291029
10301030 if (exec_ledger_fd == -1 ) {
10311031 printf ("%s: shm_open failed. Err = %s\n" , __func__ , strerror (errno ));
@@ -1099,7 +1099,7 @@ void _nvp_SHM_COPY() {
10991099 }
11001100
11011101 munmap (shm_area , 10 * 1024 * 1024 );
1102- shm_unlink (buf );
1102+ shm_unlink (exec_nvp_filename );
11031103}
11041104
11051105void _mm_cache_flush (void const * p ) {
@@ -1555,10 +1555,10 @@ void _nvp_init2(void)
15551555 atexit (nvp_exit_handler );
15561556
15571557 int pid = getpid ();
1558- char buf [BUF_SIZE ];
1558+ char exec_nvp_filename [BUF_SIZE ];
15591559
1560- sprintf (buf , "/dev/shm/exec-ledger-%d" , pid );
1561- if (access (buf , F_OK ) != -1 )
1560+ sprintf (exec_nvp_filename , "/dev/shm/exec-ledger-%d" , pid );
1561+ if (access (exec_nvp_filename , F_OK ) != -1 )
15621562 execv_done = 1 ;
15631563 else
15641564 execv_done = 0 ;
@@ -4744,7 +4744,7 @@ RETT_EXECVE _nvp_EXECVE(INTF_EXECVE) {
47444744 int exec_ledger_fd = -1 , i = 0 ;
47454745 unsigned long offset_in_map = 0 ;
47464746 int pid = getpid ();
4747- char buf [BUF_SIZE ];
4747+ char exec_nvp_filename [BUF_SIZE ];
47484748
47494749 for (i = 0 ; i < 1024 ; i ++ ) {
47504750 if (_nvp_fd_lookup [i ].offset != NULL )
@@ -4753,8 +4753,8 @@ RETT_EXECVE _nvp_EXECVE(INTF_EXECVE) {
47534753 execve_fd_passing [i ] = 0 ;
47544754 }
47554755
4756- sprintf (buf , "exec-ledger-%d" , pid );
4757- exec_ledger_fd = shm_open (buf , O_RDWR | O_CREAT , S_IRUSR | S_IWUSR );
4756+ sprintf (exec_nvp_filename , "exec-ledger-%d" , pid );
4757+ exec_ledger_fd = shm_open (exec_nvp_filename , O_RDWR | O_CREAT , S_IRUSR | S_IWUSR );
47584758 if (exec_ledger_fd == -1 ) {
47594759 printf ("%s: %s\n" , __func__ , strerror (errno ));
47604760 assert (0 );
@@ -4816,7 +4816,7 @@ RETT_EXECVP _nvp_EXECVP(INTF_EXECVP) {
48164816 int exec_ledger_fd = -1 , i = 0 ;
48174817 unsigned long offset_in_map = 0 ;
48184818 int pid = getpid ();
4819- char buf [BUF_SIZE ];
4819+ char exec_nvp_filename [BUF_SIZE ];
48204820
48214821 for (i = 0 ; i < 1024 ; i ++ ) {
48224822 if (_nvp_fd_lookup [i ].offset != NULL )
@@ -4830,8 +4830,8 @@ RETT_EXECVP _nvp_EXECVP(INTF_EXECVP) {
48304830 _nvp_FSYNC (_nvp_fd_lookup [i ].fd );
48314831 }
48324832
4833- sprintf (buf , "exec-ledger-%d" , pid );
4834- exec_ledger_fd = shm_open (buf , O_RDWR | O_CREAT , S_IRUSR | S_IWUSR );
4833+ sprintf (exec_nvp_filename , "exec-ledger-%d" , pid );
4834+ exec_ledger_fd = shm_open (exec_nvp_filename , O_RDWR | O_CREAT , S_IRUSR | S_IWUSR );
48354835 if (exec_ledger_fd == -1 ) {
48364836 printf ("%s: %s\n" , __func__ , strerror (errno ));
48374837 assert (0 );
@@ -5916,9 +5916,9 @@ RETT_DUP2 _nvp_DUP2(INTF_DUP2)
59165916 nvf2 -> node = nvf -> node ;
59175917 nvf2 -> valid = nvf -> valid ;
59185918 nvf2 -> posix = nvf -> posix ;
5919- // Increment the refernce count as this file
5920- // descriptor is pointing to the same NVFNode
5921- nvf2 -> node -> reference ++ ;
5919+ // Increment the refernce count as this file
5920+ // descriptor is pointing to the same NVFNode
5921+ nvf2 -> node -> reference ++ ;
59225922
59235923 SANITYCHECK (nvf2 -> node != NULL );
59245924 SANITYCHECK (nvf2 -> valid );
0 commit comments