Hi Srinivas,

Ack with a minor comment, tagged [Vu].

Regards, Vu

> -----Original Message-----
> From: Srinivas Mangipudy [mailto:[email protected]]
> Sent: Tuesday, October 3, 2017 2:04 PM
> To: Vu Minh Nguyen <[email protected]>;
> [email protected]
> Cc: [email protected]
> Subject: RE: [PATCH 1/1] log: corrected parsing of command logtest with
> option -e [#2121]
> 
> Hi Minh,
> 
> I have corrected the permissions of the file.
> 
> Thank you
> Srinivas
> 
> -----Original Message-----
> From: Vu Minh Nguyen [mailto:[email protected]]
> Sent: Tuesday, October 3, 2017 7:21 AM
> To: Srinivas <[email protected]>; [email protected]
> Cc: [email protected]
> Subject: RE: [PATCH 1/1] log: corrected parsing of command logtest with
> option -e [#2121]
> 
> Hi,
> 
> >  1 file changed, 14 insertions(+), 26 deletions(-)  mode change 100644
> > => 100755 src/log/apitest/logtest.c
> 
> Any reason of changing the file permission?
> 
> Regards, Vu
> 
> > -----Original Message-----
> > From: Srinivas [mailto:[email protected]]
> > Sent: Thursday, September 21, 2017 5:38 PM
> > To: [email protected]; [email protected]
> > Cc: [email protected]; Srinivas
> > <[email protected]>
> > Subject: [PATCH 1/1] log: corrected parsing of command logtest with
> > option -e [#2121]
> >
> > ---
> >  src/log/apitest/logtest.c | 40
> > ++++++++++++++--------------------------
> >  1 file changed, 14 insertions(+), 26 deletions(-)  mode change 100644
> > => 100755 src/log/apitest/logtest.c
> >
> > diff --git a/src/log/apitest/logtest.c b/src/log/apitest/logtest.c old
> > mode 100644 new mode 100755 index 2564957..6777549
> > --- a/src/log/apitest/logtest.c
> > +++ b/src/log/apitest/logtest.c
> > @@ -420,9 +420,6 @@ int main(int argc, char **argv)
> >     int suite = ALL_SUITES, tcase = ALL_TESTS;
> >     int opt_val = 0;
> >     bool etst_flg = false;
> > -   int i = 0;
> > -   char *opt_str_ptr;
> > -   char *tok_str_ptr = NULL;
> >
> >     if (setenv("SA_ENABLE_EXTENDED_NAMES", "1", 1) != 0) {
> >             fprintf(stderr, "Failed to set SA_ENABLE_EXTENDED_NAMES
> (%s)", @@
> > -468,31 +465,22 @@ int main(int argc, char **argv)
> >                     test_list();
> >                     exit(0);
> >             case 'e':
> > -                   opt_str_ptr = argv[optind - 1];
> > -
> > -                   tok_str_ptr = strtok(opt_str_ptr, " ");
> > -                   for (i = 0; i < 2; i++) {
> > -                           if (tok_str_ptr == NULL)
> > -                                   break;
> > -
> > -                           if (i == 0) {
> > -                                   suite = atoi(tok_str_ptr);
> > -                                   if (suite == 0) {
> > -                                           /* Argument is not numeric
> > or 0
> > -                                            */
> > -                                           err_exit();
> > -                                   }
> > -                           } else {
> > -                                   tcase = atoi(tok_str_ptr);
> > -                                   if (tcase == 0) {
> > -                                           /* Argument is not numeric
> > or 0
> > -                                            */
> > -                                           err_exit();
> > -                                   }
> > +                   if (argv[optind - 1] != NULL) {
> > +                           suite = atoi(argv[optind - 1]);
> > +                           if (suite == 0) {
> > +                                   /* Argument is not numeric or 0
> > +                                    */
> > +                                   err_exit();
> >                             }
> > -                           tok_str_ptr = strtok(NULL, " ");
> > +                   } else
> > +                                   err_exit();
[Vu] According to Linux coding rule, I think, we should have braces after
`else`.
> > +                   if (optind < argc && argv[optind] != NULL)
> > +                           tcase = atoi(argv[optind]);
> > +                   if (tcase == 0) {
> > +                           /* Argument is not numeric or 0
> > +                            */
> > +                           err_exit();
> >                     }
> > -
> >                     etst_flg = true;
> >                     add_suite_9();
> >                     add_suite_10();
> > --
> > 2.7.4
> 



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-devel

Reply via email to