Lines Matching refs:it

23   overdo it, ~109ch should be enough really. The `.editorconfig`, `.vimrc` and
29 - If you break a function declaration over multiple lines, do it like this:
93 i.e. use an enum for it, if possible. Indicate bit values via `1 <<`
95 it.
111 this is not a regular enum value, prefix it with `_`. Also, define a special
112 "invalid" enum value, and set it to `-EINVAL`. That way the enum type can
132 below.) Both for internal and external code it's OK to use even newer
142 environments, at least the library code should make sure it works correctly
174 much. systemd-internal headers must not rely on an include order, so it is
185 library-like code it is important to avoid global variables. Why are global
201 incompatible with glibc it's on them. However, if there are equivalent POSIX
208 - Allocate local variables where it makes sense: at the top of the block, or at
256 - Use `goto` for cleaning up, and only use it for that. I.e. you may only jump
284 infinite while loop is, our recommendation is to simply write it without any
295 numeric. Specifically, if you have an `int b` and it's only used in a boolean
321 object, please make it return the same type it takes and always return `NULL`
322 from it. This allows writing code like this:
334 some exceptions: for constructors, it is OK to return `NULL` on OOM. For
338 one cause, it *really* should have an `int` as the return value for the error
363 code. (With one exception: it is OK to log with DEBUG level from any code,
368 code. In all other calls, it is recommended to check for programming errors
372 `assert_return()` by usage of `_likely_()` inform the compiler that it should
376 - When you invoke certain calls like `unlink()`, or `mkdir_p()` and you know it
377 is safe to ignore the error it might return (because a later call would
379 thus couldn't do anything about it anyway), then make this clear by casting
412 - For every function you add, think about whether it is a "logging" function or
417 function calls a "non-logging" function, it should log about the resulting
418 errors. If a "logging" function calls another "logging" function, then it
432 If the error value is "synthetic", i.e. it was not received from
434 system to not log the errno value, but still return it:
450 then it is probably only OK if you either use a maximum size such as
467 - Use `alloca_safe()`, but never forget that it is not OK to invoke
470 not at the end of a `{}` block. Thus, if you invoke it in a loop, you keep
493 - Whenever installing a signal handler, make sure to set `SA_RESTART` for it,
509 limits after which it will refuse operation. It's fine if it is hard-coded
510 (at least initially), but it needs to be there. This is particularly
531 - Never use the `off_t` type, and particularly avoid it in public APIs. It's
532 really weirdly defined, as it usually is 64-bit and we don't support it any
533 other way, but it could in theory also be 32-bit. Which one it is depends on
535 using it unless they can also follow the program's choice. Moreover, in
561 - When you allocate a file descriptor, it should be made `O_CLOEXEC` right from
579 `O_NONBLOCK` has a benefit: it bypasses any mandatory lock that might be in
588 to do so, as it makes it easy to identify command line parameter variables,
589 and makes it clear why it is OK that they are global variables.
608 for it. The reason is that making it `const` fixates the contract that your
611 lazy initialization of object variables. Moreover, it's usually not too
618 please always suffix it with `=`, to indicate that it is a configuration file
622 always prefix with `--` or `-` (as appropriate), to indicate that it is a
626 suffix it with `/`, to indicate that it is a directory, not a regular file
642 and `htobe16()` instead, it's much more descriptive, and actually says what
646 hence we might want to call it "big endian" right-away.
652 semantics of those `fd`s, it's probably a good idea to avoid
655 - Don't use `fgets()`, it's too hard to properly handle errors such as overly
669 comment about it, so that no code ever ends up using the POSIX version!