Print this page
OS-1576 Sundry uninitialised variables
Reviewed by: Robert Mustacchi <rm@joyent.com>


  99                  */
 100                 perror("ioctl");
 101                 free(ep);
 102                 return (1);
 103         }
 104         for (i = 0; i < e.hce_cnt; i++)
 105                 (void) printf("%s %s\n", ep[i].hce_path, ep[i].hce_name);
 106 
 107         free(ep);
 108         return (0);
 109 }
 110 
 111 int
 112 main(int argc, char **argv)
 113 {
 114         int i, ap;
 115         cmd_t cmd;
 116         int cnt = 0;
 117         int fd;
 118         int rv = 0;
 119         hyprlofs_entry_t *e;
 120         hyprlofs_entries_t ents;
 121 
 122         if (argc < 3) {
 123                 (void) fprintf(stderr, "%s\n", usage);
 124                 exit(1);
 125         }
 126 
 127         if ((fd = open(argv[1], O_RDONLY)) < 0) {
 128                 perror("can't open hyprlofs mount");
 129                 exit(1);
 130         }
 131 
 132         if (strcmp(argv[2], "add") == 0) {
 133                 cmd = CMD_ADD;
 134         } else if (strcmp(argv[2], "rm") == 0) {
 135                 cmd = CMD_RM;
 136         } else if (strcmp(argv[2], "clear") == 0) {
 137                 cmd = CMD_CLR;
 138         } else if (strcmp(argv[2], "addl") == 0) {
 139                 cmd = CMD_ADDL;




  99                  */
 100                 perror("ioctl");
 101                 free(ep);
 102                 return (1);
 103         }
 104         for (i = 0; i < e.hce_cnt; i++)
 105                 (void) printf("%s %s\n", ep[i].hce_path, ep[i].hce_name);
 106 
 107         free(ep);
 108         return (0);
 109 }
 110 
 111 int
 112 main(int argc, char **argv)
 113 {
 114         int i, ap;
 115         cmd_t cmd;
 116         int cnt = 0;
 117         int fd;
 118         int rv = 0;
 119         hyprlofs_entry_t *e = NULL;
 120         hyprlofs_entries_t ents;
 121 
 122         if (argc < 3) {
 123                 (void) fprintf(stderr, "%s\n", usage);
 124                 exit(1);
 125         }
 126 
 127         if ((fd = open(argv[1], O_RDONLY)) < 0) {
 128                 perror("can't open hyprlofs mount");
 129                 exit(1);
 130         }
 131 
 132         if (strcmp(argv[2], "add") == 0) {
 133                 cmd = CMD_ADD;
 134         } else if (strcmp(argv[2], "rm") == 0) {
 135                 cmd = CMD_RM;
 136         } else if (strcmp(argv[2], "clear") == 0) {
 137                 cmd = CMD_CLR;
 138         } else if (strcmp(argv[2], "addl") == 0) {
 139                 cmd = CMD_ADDL;