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

Diff for /src/usr.bin/showmount/showmount.c between version 1.19 and 1.20

version 1.19, 2015/11/17 15:01:28 version 1.20, 2016/03/16 15:41:11
Line 167 
Line 167 
                 err(1, "pledge");                  err(1, "pledge");
   
         if (rpcs & DODUMP) {          if (rpcs & DODUMP) {
                 estat = clnt_call(client, RPCMNT_DUMP, xdr_void, (char *)0,                  estat = clnt_call(client, RPCMNT_DUMP, xdr_void, NULL,
                     xdr_mntdump, (char *)&mntdump, timeout);                      xdr_mntdump, (char *)&mntdump, timeout);
                 if (estat != RPC_SUCCESS) {                  if (estat != RPC_SUCCESS) {
                         fprintf(stderr, "showmount: Can't do Mountdump rpc: ");                          fprintf(stderr, "showmount: Can't do Mountdump rpc: ");
Line 176 
Line 176 
                 }                  }
         }          }
         if (rpcs & DOEXPORTS) {          if (rpcs & DOEXPORTS) {
                 estat = clnt_call(client, RPCMNT_EXPORT, xdr_void, (char *)0,                  estat = clnt_call(client, RPCMNT_EXPORT, xdr_void, NULL,
                     xdr_exports, (char *)&exports, timeout);                      xdr_exports, (char *)&exports, timeout);
                 if (estat != RPC_SUCCESS) {                  if (estat != RPC_SUCCESS) {
                         fprintf(stderr, "showmount: Can't do Exports rpc: ");                          fprintf(stderr, "showmount: Can't do Exports rpc: ");
Line 238 
Line 238 
         int bool, val, val2;          int bool, val, val2;
         char *strp;          char *strp;
   
         *mlp = (struct mountlist *)0;          *mlp = NULL;
         if (!xdr_bool(xdrsp, &bool))          if (!xdr_bool(xdrsp, &bool))
                 return (0);                  return (0);
         while (bool) {          while (bool) {
                 mp = malloc(sizeof(struct mountlist));                  mp = malloc(sizeof(struct mountlist));
                 if (mp == NULL)                  if (mp == NULL)
                         return (0);                          return (0);
                 mp->ml_left = mp->ml_right = (struct mountlist *)0;                  mp->ml_left = mp->ml_right = NULL;
                 strp = mp->ml_host;                  strp = mp->ml_host;
                 if (!xdr_string(xdrsp, &strp, RPCMNT_NAMELEN))                  if (!xdr_string(xdrsp, &strp, RPCMNT_NAMELEN))
                         return (0);                          return (0);
Line 316 
Line 316 
         int bool, grpbool;          int bool, grpbool;
         char *strp;          char *strp;
   
         *exp = (struct exportslist *)0;          *exp = NULL;
         if (!xdr_bool(xdrsp, &bool))          if (!xdr_bool(xdrsp, &bool))
                 return (0);                  return (0);
         while (bool) {          while (bool) {
                 ep = malloc(sizeof(struct exportslist));                  ep = malloc(sizeof(struct exportslist));
                 if (ep == NULL)                  if (ep == NULL)
                         return (0);                          return (0);
                 ep->ex_groups = (struct grouplist *)0;                  ep->ex_groups = NULL;
                 strp = ep->ex_dirp;                  strp = ep->ex_dirp;
                 if (!xdr_string(xdrsp, &strp, RPCMNT_PATHLEN))                  if (!xdr_string(xdrsp, &strp, RPCMNT_PATHLEN))
                         return (0);                          return (0);

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20