Changeset 12
- Timestamp:
- 07/27/07 13:10:28
(1 year ago)
- Author:
- tmiller
- Message:
Make return value match API
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r4 |
r12 |
|
| 38 | 38 | int mqueue_create(key_t key) |
|---|
| 39 | 39 | { |
|---|
| 40 | | int msqid = 0; |
|---|
| | 40 | int msqid; |
|---|
| 41 | 41 | |
|---|
| 42 | 42 | msqid = msgget(key, MQ_PERMS|IPC_CREAT|IPC_EXCL); |
|---|
| 43 | | if (msqid < 0) |
|---|
| | 43 | if (msqid < 0) { |
|---|
| 44 | 44 | fprintf(stderr, "msgget: %s\n", strerror(errno)); |
|---|
| | 45 | return -1; |
|---|
| | 46 | } |
|---|
| 45 | 47 | |
|---|
| 46 | | return msqid; |
|---|
| | 48 | return 0; |
|---|
| 47 | 49 | } |
|---|
| 48 | 50 | |
|---|
Download in other formats:
* Generating other formats may take time.