Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
6dafd056
Commit
6dafd056
authored
Oct 31, 2008
by
Shawn O. Pearce
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document the return NULL style of calling convention
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
parent
6533aadc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
CONVENTIONS
+12
-0
No files found.
CONVENTIONS
View file @
6dafd056
...
@@ -57,6 +57,18 @@ This permits common POSIX result testing:
...
@@ -57,6 +57,18 @@ This permits common POSIX result testing:
abort("odb open failed");
abort("odb open failed");
----
----
Functions returning a pointer may return NULL instead of an int
if there is only one type of failure (ENOMEM).
Functions returning a pointer may also return NULL if the common
case needed by the application is strictly success/failure and a
(possibly slower) function exists that the caller can use to get
more detailed information. Parsing common data structures from
on-disk formats is a good example of this pattern; in general a
"corrupt" entity can be treated as though it does not exist but
a more sophisticated "fsck" support function can report how the
entity is malformed.
Documentation Fomatting
Documentation Fomatting
-----------------------
-----------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment