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