Changeset 15212


Ignore:
Timestamp:
Feb 15, 2012, 8:39:21 AM (8 years ago)
Author:
gb
Message:

learn to use C string functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/androidarm/aarmcl.c

    r15205 r15212  
    1818  if ((n = readlink("/proc/self/exe", buf, PATH_MAX)) > 0) {
    1919    path = malloc(n+4+3);
     20    buf[n] = 0;
    2021    lastslash = strrchr(buf,'/');
    2122    if (lastslash) {
     
    2324      prefixlen = lastslash-buf;
    2425      strncpy(path,buf,prefixlen);
     26      path[prefixlen] = 0;
    2527      strcat(path,"lib");
    2628      strcat(path,lastslash);
Note: See TracChangeset for help on using the changeset viewer.