Skip to content
Snippets Groups Projects
  • Colin Walters's avatar
    074236b8
    errors: Add new glnx_throw_errno{,_prefix}() APIs · 074236b8
    Colin Walters authored
    We have a *lot* of code of the form:
    
    ```
    if (unlinkat (fd, pathname) < 0)
      {
         glnx_set_error_from_errno (error);
         goto out;
      }
    ```
    
    After conversion to `return FALSE style` which is in progress, it's way shorter,
    and clearer like this:
    
    ```
    if (unlinkat (fd, pathname) < 0)
      return glnx_throw_errno (error);
    ```
    074236b8
    History
    errors: Add new glnx_throw_errno{,_prefix}() APIs
    Colin Walters authored
    We have a *lot* of code of the form:
    
    ```
    if (unlinkat (fd, pathname) < 0)
      {
         glnx_set_error_from_errno (error);
         goto out;
      }
    ```
    
    After conversion to `return FALSE style` which is in progress, it's way shorter,
    and clearer like this:
    
    ```
    if (unlinkat (fd, pathname) < 0)
      return glnx_throw_errno (error);
    ```
glnx-errors.c 1.60 KiB