Project

General

Profile

Bug #4024

uninitialized and unused variables in cmd/fs.d/nfs

Added by Igor Kozhukhov over 7 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Low
Category:
cmd - userland programs
Start date:
2013-08-09
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

diff -r 7168da1805f9 usr/src/cmd/fs.d/nfs/lib/smfcfg.c
--- a/usr/src/cmd/fs.d/nfs/lib/smfcfg.c Fri Aug 09 17:37:48 2013 +0400
+++ b/usr/src/cmd/fs.d/nfs/lib/smfcfg.c Fri Aug 09 18:42:37 2013 +0400
@@ -104,12 +104,12 @@ int
 fs_smf_set_prop(smf_fstype_t fstype, char *prop_name, char *valbuf,
     char *instance, scf_type_t sctype, char *fmri)
 {
-       fs_smfhandle_t *phandle;
+       fs_smfhandle_t *phandle = NULL;
        scf_handle_t *handle;
        scf_propertygroup_t *pg;
        scf_property_t *prop;
-       scf_transaction_t *tran;
-       scf_transaction_entry_t *entry;
+       scf_transaction_t *tran = NULL;
+       scf_transaction_entry_t *entry = NULL;
        scf_instance_t *inst;
        scf_value_t *val;
        int valint;
@@ -238,7 +238,7 @@ int
 fs_smf_get_prop(smf_fstype_t fstype, char *prop_name, char *cbuf,
     char *instance, scf_type_t sctype, char *fmri, int *bufsz)
 {
-       fs_smfhandle_t *phandle;
+       fs_smfhandle_t *phandle = NULL;
        scf_handle_t *handle;
        scf_propertygroup_t *pg;
        scf_property_t *prop;
diff -r 7168da1805f9 usr/src/cmd/fs.d/nfs/mountd/mountd.c
--- a/usr/src/cmd/fs.d/nfs/mountd/mountd.c      Fri Aug 09 17:37:48 2013 +0400
+++ b/usr/src/cmd/fs.d/nfs/mountd/mountd.c      Fri Aug 09 18:42:37 2013 +0400
@@ -2020,7 +2020,7 @@ getclientsflavors_new(share_t *sh, SVCXP
        char *lasts;
        char *f;
        boolean_t access_ok;
-       int count, c, perm;
+       int count, c;
        boolean_t reject = B_FALSE;

        opts = strdup(sh->sh_opts);
@@ -2030,7 +2030,7 @@ getclientsflavors_new(share_t *sh, SVCXP
        }

        p = opts;
-       perm = count = c = 0;
+       count = c = 0;
        /* default access is rw */
        access_ok = B_TRUE;

#1

Updated by Igor Kozhukhov over 7 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 90
#2

Updated by Igor Kozhukhov over 7 years ago

  • Status changed from Feedback to In Progress
  • % Done changed from 90 to 100
#3

Updated by Igor Kozhukhov over 7 years ago

  • Status changed from In Progress to Pending RTI
#4

Updated by Robert Mustacchi over 7 years ago

  • Subject changed from uninitialized and unused variables to uninitialized and unused variables in cmd/fs.d/nfs
#5

Updated by Robert Mustacchi over 7 years ago

  • Category set to cmd - userland programs
  • Priority changed from Normal to Low
  • Tags deleted (needs-triage)

Resolved in cf7e209d5f01e9f5fe052b444899ba9cba0e9877.

#6

Updated by Igor Kozhukhov over 7 years ago

  • Status changed from Pending RTI to In Progress
#7

Updated by Igor Kozhukhov over 7 years ago

  • Status changed from In Progress to Closed

Resolved in cf7e209d5f01e9f5fe052b444899ba9cba0e9877.

Also available in: Atom PDF