Changes in / [d9ffc54:6b00876] in mainline
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/console/kconsole.c
rd9ffc54 r6b00876 368 368 */ 369 369 size_t beg; 370 unsigned narg = 0;370 unsigned sp = 0, narg = 0; 371 371 if (position == 0) { 372 372 tmp[0] = '\0'; 373 373 beg = 0; 374 } else { 375 for (beg = position - 1; 376 (beg > 0) && (!isspace(current[beg])); 377 beg--) { 378 ; 379 } 374 } 375 else { 376 for (beg = position - 1; (beg > 0) && (!isspace(current[beg])); 377 beg--); 380 378 381 379 if (isspace(current[beg])) … … 386 384 387 385 /* Count which argument number are we tabbing (narg=0 is cmd) */ 388 bool sp = false;389 386 for (; beg > 0; beg--) { 390 387 if (isspace(current[beg])) { 391 388 if (!sp) { 392 389 narg++; 393 sp = true;390 sp = 1; 394 391 } 395 } else 396 sp = false; 392 } 393 else 394 sp = 0; 397 395 } 398 396 if (narg && isspace(current[0])) -
uspace/lib/drv/generic/driver.c
rd9ffc54 r6b00876 121 121 devman_handle_t parent_fun_handle = IPC_GET_ARG2(*icall); 122 122 123 ddf_dev_t *dev = create_device(); 124 125 /* Add one reference that will be dropped by driver_dev_remove() */ 126 dev_add_ref(dev); 127 dev->handle = dev_handle; 128 123 129 char *dev_name = NULL; 124 130 int rc = async_data_write_accept((void **) &dev_name, true, 0, 0, 0, 0); … … 127 133 return; 128 134 } 129 130 ddf_dev_t *dev = create_device(); 131 if (!dev) { 132 free(dev_name); 133 async_answer_0(iid, ENOMEM); 134 return; 135 } 136 137 /* Add one reference that will be dropped by driver_dev_remove() */ 138 dev_add_ref(dev); 139 dev->handle = dev_handle; 135 140 136 dev->name = dev_name; 141 137 … … 499 495 if (dev->driver_data != NULL) 500 496 free(dev->driver_data); 501 if (dev->name)502 free(dev->name);503 497 free(dev); 504 498 }
Note:
See TracChangeset
for help on using the changeset viewer.