[BACK]Return to getent.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / getent

Diff for /src/usr.bin/getent/getent.c between version 1.12 and 1.13

version 1.12, 2015/10/10 21:50:05 version 1.13, 2016/02/01 19:52:40
Line 439 
Line 439 
         return rv;          return rv;
 }  }
   
 #define SHELLSPRINT     printf("%s\n", sh)  
   
 static int  static int
 shells(int argc, char *argv[])  shells(int argc, char *argv[])
 {  {
Line 450 
Line 448 
         setusershell();          setusershell();
         if (argc == 2) {          if (argc == 2) {
                 while ((sh = getusershell()) != NULL)                  while ((sh = getusershell()) != NULL)
                         SHELLSPRINT;                          printf("%s\n", sh);
         } else {          } else {
                 for (i = 2; i < argc; i++) {                  for (i = 2; i < argc; i++) {
                         setusershell();                          setusershell();
                         while ((sh = getusershell()) != NULL) {                          while ((sh = getusershell()) != NULL) {
                                 if (strcmp(sh, argv[i]) == 0) {                                  if (strcmp(sh, argv[i]) == 0) {
                                         SHELLSPRINT;                                          printf("%s\n", sh);
                                         break;                                          break;
                                 }                                  }
                         }                          }

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13