summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormillert <>2001-07-29 21:15:23 +0000
committermillert <>2001-07-29 21:15:23 +0000
commitb17124d99400f85e78efed63834c91086f805fd2 (patch)
tree861c343767df06aa1e8baa29f432144bf033cf6f /src
parent815ffb17b4390d87524b96e6b66ea0e0b6050d8c (diff)
downloadopenbsd-b17124d99400f85e78efed63834c91086f805fd2.tar.gz
openbsd-b17124d99400f85e78efed63834c91086f805fd2.tar.bz2
openbsd-b17124d99400f85e78efed63834c91086f805fd2.zip
Minor style pedentry from ben@arbor.net plus some of my own and sync
libkern and libc versions.
Diffstat (limited to 'src')
-rw-r--r--src/lib/libc/string/strlen.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/lib/libc/string/strlen.c b/src/lib/libc/string/strlen.c
index 332d5766f9..ab006e04c2 100644
--- a/src/lib/libc/string/strlen.c
+++ b/src/lib/libc/string/strlen.c
@@ -1,6 +1,8 @@
1/* $OpenBSD: strlen.c,v 1.4 2001/07/29 21:15:23 millert Exp $ */
2
1/*- 3/*-
2 * Copyright (c) 1990 The Regents of the University of California. 4 * Copyright (c) 1990, 1993
3 * All rights reserved. 5 * The Regents of the University of California. All rights reserved.
4 * 6 *
5 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
@@ -32,10 +34,10 @@
32 */ 34 */
33 35
34#if defined(LIBC_SCCS) && !defined(lint) 36#if defined(LIBC_SCCS) && !defined(lint)
35static char *rcsid = "$OpenBSD: strlen.c,v 1.3 1996/08/19 08:34:19 tholo Exp $"; 37static char *rcsid = "$OpenBSD: strlen.c,v 1.4 2001/07/29 21:15:23 millert Exp $";
36#endif /* LIBC_SCCS and not lint */ 38#endif /* LIBC_SCCS and not lint */
37 39
38#ifndef _KERNEL 40#if !defined(_KERNEL) && !defined(_STANDALONE)
39#include <string.h> 41#include <string.h>
40#else 42#else
41#include <lib/libkern/libkern.h> 43#include <lib/libkern/libkern.h>
@@ -45,9 +47,10 @@ size_t
45strlen(str) 47strlen(str)
46 const char *str; 48 const char *str;
47{ 49{
48 register const char *s; 50 const char *s;
49 51
50 for (s = str; *s; ++s); 52 for (s = str; *s; ++s)
51 return(s - str); 53 ;
54 return (s - str);
52} 55}
53 56