chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1dfa7e7
)
journal-send: simplification
author
Lennart Poettering
<lennart@poettering.net>
Wed, 3 Oct 2012 15:50:45 +0000
(11:50 -0400)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 3 Oct 2012 15:55:38 +0000
(11:55 -0400)
src/journal/journal-send.c
patch
|
blob
|
history
diff --git
a/src/journal/journal-send.c
b/src/journal/journal-send.c
index d503f3f428e56c5cab0a4f41aaaaad897ca1f050..8589d94479456d055a293f8ba2f40aec041ba625 100644
(file)
--- a/
src/journal/journal-send.c
+++ b/
src/journal/journal-send.c
@@
-505,10
+505,10
@@
_public_ int sd_journal_printv_with_location(int priority, const char *file, con
/* func is initialized from __func__ which is not a macro, but
* a static const char[], hence cannot easily be prefixed with
* CODE_FUNC=, hence let's do it manually here. */
/* func is initialized from __func__ which is not a macro, but
* a static const char[], hence cannot easily be prefixed with
* CODE_FUNC=, hence let's do it manually here. */
- fl = strlen(func);
+ fl = strlen(func)
+ 1
;
f = alloca(fl + 10);
memcpy(f, "CODE_FUNC=", 10);
f = alloca(fl + 10);
memcpy(f, "CODE_FUNC=", 10);
- memcpy(f + 10, func, fl
+ 1
);
+ memcpy(f + 10, func, fl);
zero(iov);
IOVEC_SET_STRING(iov[0], buffer);
zero(iov);
IOVEC_SET_STRING(iov[0], buffer);
@@
-536,10
+536,10
@@
_public_ int sd_journal_send_with_location(const char *file, const char *line, c
goto finish;
}
goto finish;
}
- fl = strlen(func);
+ fl = strlen(func)
+ 1
;
f = alloca(fl + 10);
memcpy(f, "CODE_FUNC=", 10);
f = alloca(fl + 10);
memcpy(f, "CODE_FUNC=", 10);
- memcpy(f + 10, func, fl
+ 1
);
+ memcpy(f + 10, func, fl);
IOVEC_SET_STRING(iov[0], file);
IOVEC_SET_STRING(iov[1], line);
IOVEC_SET_STRING(iov[0], file);
IOVEC_SET_STRING(iov[1], line);
@@
-574,10
+574,10
@@
_public_ int sd_journal_sendv_with_location(
niov = alloca(sizeof(struct iovec) * (n + 3));
memcpy(niov, iov, sizeof(struct iovec) * n);
niov = alloca(sizeof(struct iovec) * (n + 3));
memcpy(niov, iov, sizeof(struct iovec) * n);
- fl = strlen(func);
+ fl = strlen(func)
+ 1
;
f = alloca(fl + 10);
memcpy(f, "CODE_FUNC=", 10);
f = alloca(fl + 10);
memcpy(f, "CODE_FUNC=", 10);
- memcpy(f + 10, func, fl
+ 1
);
+ memcpy(f + 10, func, fl);
IOVEC_SET_STRING(niov[n++], file);
IOVEC_SET_STRING(niov[n++], line);
IOVEC_SET_STRING(niov[n++], file);
IOVEC_SET_STRING(niov[n++], line);
@@
-595,10
+595,10
@@
_public_ int sd_journal_perror_with_location(
size_t fl;
char *f;
size_t fl;
char *f;
- fl = strlen(func);
+ fl = strlen(func)
+ 1
;
f = alloca(fl + 10);
memcpy(f, "CODE_FUNC=", 10);
f = alloca(fl + 10);
memcpy(f, "CODE_FUNC=", 10);
- memcpy(f + 10, func, fl
+ 1
);
+ memcpy(f + 10, func, fl);
IOVEC_SET_STRING(iov[0], file);
IOVEC_SET_STRING(iov[1], line);
IOVEC_SET_STRING(iov[0], file);
IOVEC_SET_STRING(iov[1], line);